Astrow Cloud REST API

ExportService

deleteEmployee

Delete employee from Astrow and it's associated user


/employee/{employeeid}/

Usage and SDK Samples

curl -X DELETE -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/employee/{employeeid}/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        String employeeid = employeeid_example; // String | The identifier employee to be deleted.
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.deleteEmployee(employeeid, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#deleteEmployee");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        String employeeid = employeeid_example; // String | The identifier employee to be deleted.
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.deleteEmployee(employeeid, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#deleteEmployee");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
String *employeeid = employeeid_example; // The identifier employee to be deleted.
String *employeeKeyName = employeeKeyName_example; // One of persnr, badgenr, employeenr, registernr

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Delete employee from Astrow and it's associated user
[apiInstance deleteEmployeeWith:employeeid
    employeeKeyName:employeeKeyName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var employeeid = employeeid_example; // {{String}} The identifier employee to be deleted.
var employeeKeyName = employeeKeyName_example; // {{String}} One of persnr, badgenr, employeenr, registernr

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteEmployee(employeeid, employeeKeyName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteEmployeeExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var employeeid = employeeid_example;  // String | The identifier employee to be deleted.
            var employeeKeyName = employeeKeyName_example;  // String | One of persnr, badgenr, employeenr, registernr

            try
            {
                // Delete employee from Astrow and it's associated user
                apiInstance.deleteEmployee(employeeid, employeeKeyName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.deleteEmployee: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$employeeid = employeeid_example; // String | The identifier employee to be deleted.
$employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr

try {
    $api_instance->deleteEmployee($employeeid, $employeeKeyName);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->deleteEmployee: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $employeeid = employeeid_example; # String | The identifier employee to be deleted.
my $employeeKeyName = employeeKeyName_example; # String | One of persnr, badgenr, employeenr, registernr

eval { 
    $api_instance->deleteEmployee(employeeid => $employeeid, employeeKeyName => $employeeKeyName);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->deleteEmployee: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
employeeid = employeeid_example # String | The identifier employee to be deleted.
employeeKeyName = employeeKeyName_example # String | One of persnr, badgenr, employeenr, registernr

try: 
    # Delete employee from Astrow and it's associated user
    api_instance.delete_employee(employeeid, employeeKeyName)
except ApiException as e:
    print("Exception when calling ExportServiceApi->deleteEmployee: %s\n" % e)

Parameters

Path parameters
Name Description
employeeid*
String
The identifier employee to be deleted.
Required
Header parameters
Name Description
employeeKeyName*
String
One of persnr, badgenr, employeenr, registernr
Required

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 1000 Invalid employee key name • 1001 Invalid employee

patchEmployee

Patch employee. Import employee License is needed


/employee/{employeeid}/

Usage and SDK Samples

curl -X PATCH -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/employee/{employeeid}/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        Employee body = ; // Employee | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        String employeeid = employeeid_example; // String | The identifier employee to be patched.
        try {
            apiInstance.patchEmployee(body, employeeKeyName, employeeid);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#patchEmployee");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        Employee body = ; // Employee | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        String employeeid = employeeid_example; // String | The identifier employee to be patched.
        try {
            apiInstance.patchEmployee(body, employeeKeyName, employeeid);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#patchEmployee");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
Employee *body = ; // 
String *employeeKeyName = employeeKeyName_example; // One of persnr, badgenr, employeenr, registernr
String *employeeid = employeeid_example; // The identifier employee to be patched.

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Patch employee. Import employee License is needed
[apiInstance patchEmployeeWith:body
    employeeKeyName:employeeKeyName
    employeeid:employeeid
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var body = ; // {{Employee}} 
var employeeKeyName = employeeKeyName_example; // {{String}} One of persnr, badgenr, employeenr, registernr
var employeeid = employeeid_example; // {{String}} The identifier employee to be patched.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.patchEmployee(bodyemployeeKeyNameemployeeid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class patchEmployeeExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var body = new Employee(); // Employee | 
            var employeeKeyName = employeeKeyName_example;  // String | One of persnr, badgenr, employeenr, registernr
            var employeeid = employeeid_example;  // String | The identifier employee to be patched.

            try
            {
                // Patch employee. Import employee License is needed
                apiInstance.patchEmployee(body, employeeKeyName, employeeid);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.patchEmployee: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$body = ; // Employee | 
$employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
$employeeid = employeeid_example; // String | The identifier employee to be patched.

try {
    $api_instance->patchEmployee($body, $employeeKeyName, $employeeid);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->patchEmployee: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $body = WWW::SwaggerClient::Object::Employee->new(); # Employee | 
my $employeeKeyName = employeeKeyName_example; # String | One of persnr, badgenr, employeenr, registernr
my $employeeid = employeeid_example; # String | The identifier employee to be patched.

eval { 
    $api_instance->patchEmployee(body => $body, employeeKeyName => $employeeKeyName, employeeid => $employeeid);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->patchEmployee: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
body =  # Employee | 
employeeKeyName = employeeKeyName_example # String | One of persnr, badgenr, employeenr, registernr
employeeid = employeeid_example # String | The identifier employee to be patched.

try: 
    # Patch employee. Import employee License is needed
    api_instance.patch_employee(body, employeeKeyName, employeeid)
except ApiException as e:
    print("Exception when calling ExportServiceApi->patchEmployee: %s\n" % e)

Parameters

Path parameters
Name Description
employeeid*
String
The identifier employee to be patched.
Required
Header parameters
Name Description
employeeKeyName*
String
One of persnr, badgenr, employeenr, registernr
Required
Body parameters
Name Description
body *

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 1000 Invalid employee key name • 1001 Invalid employee • 4000 Invalid badge • 4001 Pending change in progress • 4002 Cycle overlaps existing one • 4003 Paygroup overlaps existing one • 4004 Cycle not found • 4005 Paygroup not found • 4006 Company Site not found • 4007 Cost Group not found • 4008 Chop Group not found • 4009 Chop group overlaps existing one • 4010 Cost group overlaps existing one • 4011 Department overlaps existing one • 4012 Department not found

pullAbsences

Pulls all new operations on the absences performed since last call of pullAbsences(). For initial setup, if needed, Amano has to process old Absences in order to be exported.


/absences

Usage and SDK Samples

curl -X GET -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/absences"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        try {
            array[AbsenceOperation] result = apiInstance.pullAbsences();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#pullAbsences");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        try {
            array[AbsenceOperation] result = apiInstance.pullAbsences();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#pullAbsences");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Pulls all new operations on the absences performed since last call of pullAbsences(). For initial setup, if needed, Amano has to process old Absences in order to be exported.
[apiInstance pullAbsencesWithCompletionHandler: 
              ^(array[AbsenceOperation] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pullAbsences(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pullAbsencesExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();

            try
            {
                // Pulls all new operations on the absences performed since last call of pullAbsences(). For initial setup, if needed, Amano has to process old Absences in order to be exported.
                array[AbsenceOperation] result = apiInstance.pullAbsences();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.pullAbsences: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();

try {
    $result = $api_instance->pullAbsences();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->pullAbsences: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();

eval { 
    my $result = $api_instance->pullAbsences();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->pullAbsences: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()

try: 
    # Pulls all new operations on the absences performed since last call of pullAbsences(). For initial setup, if needed, Amano has to process old Absences in order to be exported.
    api_response = api_instance.pull_absences()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportServiceApi->pullAbsences: %s\n" % e)

Parameters

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error

pullBookings

Get the bookings based on start and end date. When connected to a lower version of Astrow than 11.2, start date and end date will be ignored. It will retrive bookings based on the Web.config setting BookingsExportPastDaysNumber relative to current date


/booking

Usage and SDK Samples

curl -X GET -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/booking?startDate=&endDate=&includesynced="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        String startDate = startDate_example; // String | Start date YYYY-mm-dd format
        String endDate = endDate_example; // String | End date YYYY-mm-dd format
        String includesynced = includesynced_example; // String | Include already synced.
        try {
            array[Bookings] result = apiInstance.pullBookings(startDate, endDate, includesynced);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#pullBookings");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        String startDate = startDate_example; // String | Start date YYYY-mm-dd format
        String endDate = endDate_example; // String | End date YYYY-mm-dd format
        String includesynced = includesynced_example; // String | Include already synced.
        try {
            array[Bookings] result = apiInstance.pullBookings(startDate, endDate, includesynced);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#pullBookings");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
String *startDate = startDate_example; // Start date YYYY-mm-dd format
String *endDate = endDate_example; // End date YYYY-mm-dd format
String *includesynced = includesynced_example; // Include already synced.

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Get the bookings based on start and end date. When connected to a lower version of Astrow than 11.2, start date and end date will be ignored.

 It will retrive bookings based on the Web.config setting BookingsExportPastDaysNumber relative to current date
[apiInstance pullBookingsWith:startDate
    endDate:endDate
    includesynced:includesynced
              completionHandler: ^(array[Bookings] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var startDate = startDate_example; // {{String}} Start date YYYY-mm-dd format
var endDate = endDate_example; // {{String}} End date YYYY-mm-dd format
var includesynced = includesynced_example; // {{String}} Include already synced.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pullBookings(startDate, endDate, includesynced, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pullBookingsExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var startDate = startDate_example;  // String | Start date YYYY-mm-dd format
            var endDate = endDate_example;  // String | End date YYYY-mm-dd format
            var includesynced = includesynced_example;  // String | Include already synced.

            try
            {
                // Get the bookings based on start and end date. When connected to a lower version of Astrow than 11.2, start date and end date will be ignored.

 It will retrive bookings based on the Web.config setting BookingsExportPastDaysNumber relative to current date
                array[Bookings] result = apiInstance.pullBookings(startDate, endDate, includesynced);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.pullBookings: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$startDate = startDate_example; // String | Start date YYYY-mm-dd format
$endDate = endDate_example; // String | End date YYYY-mm-dd format
$includesynced = includesynced_example; // String | Include already synced.

try {
    $result = $api_instance->pullBookings($startDate, $endDate, $includesynced);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->pullBookings: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $startDate = startDate_example; # String | Start date YYYY-mm-dd format
my $endDate = endDate_example; # String | End date YYYY-mm-dd format
my $includesynced = includesynced_example; # String | Include already synced.

eval { 
    my $result = $api_instance->pullBookings(startDate => $startDate, endDate => $endDate, includesynced => $includesynced);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->pullBookings: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
startDate = startDate_example # String | Start date YYYY-mm-dd format
endDate = endDate_example # String | End date YYYY-mm-dd format
includesynced = includesynced_example # String | Include already synced.

try: 
    # Get the bookings based on start and end date. When connected to a lower version of Astrow than 11.2, start date and end date will be ignored.

 It will retrive bookings based on the Web.config setting BookingsExportPastDaysNumber relative to current date
    api_response = api_instance.pull_bookings(startDate, endDate, includesynced)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportServiceApi->pullBookings: %s\n" % e)

Parameters

Query parameters
Name Description
startDate*
String
Start date YYYY-mm-dd format
Required
endDate*
String
End date YYYY-mm-dd format
Required
includesynced*
String
Include already synced.
Required

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error

pullEmployees

Pull all employees from Astrow


/employee

Usage and SDK Samples

curl -X GET -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/employee"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        String dBLanguageField = dBLanguageField_example; // String | Astrow DB Language Field
        try {
            array[Employee] result = apiInstance.pullEmployees(dBLanguageField);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#pullEmployees");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        String dBLanguageField = dBLanguageField_example; // String | Astrow DB Language Field
        try {
            array[Employee] result = apiInstance.pullEmployees(dBLanguageField);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#pullEmployees");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
String *dBLanguageField = dBLanguageField_example; // Astrow DB Language Field

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Pull all employees from Astrow
[apiInstance pullEmployeesWith:dBLanguageField
              completionHandler: ^(array[Employee] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var dBLanguageField = dBLanguageField_example; // {{String}} Astrow DB Language Field

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pullEmployees(dBLanguageField, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pullEmployeesExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var dBLanguageField = dBLanguageField_example;  // String | Astrow DB Language Field

            try
            {
                // Pull all employees from Astrow
                array[Employee] result = apiInstance.pullEmployees(dBLanguageField);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.pullEmployees: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$dBLanguageField = dBLanguageField_example; // String | Astrow DB Language Field

try {
    $result = $api_instance->pullEmployees($dBLanguageField);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->pullEmployees: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $dBLanguageField = dBLanguageField_example; # String | Astrow DB Language Field

eval { 
    my $result = $api_instance->pullEmployees(dBLanguageField => $dBLanguageField);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->pullEmployees: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
dBLanguageField = dBLanguageField_example # String | Astrow DB Language Field

try: 
    # Pull all employees from Astrow
    api_response = api_instance.pull_employees(dBLanguageField)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportServiceApi->pullEmployees: %s\n" % e)

Parameters

Header parameters
Name Description
DBLanguageField*
String
Astrow DB Language Field
Required

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error

putBooking

Puts booking for employee. File terminal License is needed


/booking

Usage and SDK Samples

curl -X PUT -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/booking"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Booking] body = ; // array[Booking] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.putBooking(body, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putBooking");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Booking] body = ; // array[Booking] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.putBooking(body, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putBooking");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
array[Booking] *body = ; // 
String *employeeKeyName = employeeKeyName_example; // One of persnr, badgenr, employeenr, registernr

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Puts booking for employee. File terminal License is needed
[apiInstance putBookingWith:body
    employeeKeyName:employeeKeyName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var body = ; // {{array[Booking]}} 
var employeeKeyName = employeeKeyName_example; // {{String}} One of persnr, badgenr, employeenr, registernr

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.putBooking(bodyemployeeKeyName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putBookingExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var body = new array[Booking](); // array[Booking] | 
            var employeeKeyName = employeeKeyName_example;  // String | One of persnr, badgenr, employeenr, registernr

            try
            {
                // Puts booking for employee. File terminal License is needed
                apiInstance.putBooking(body, employeeKeyName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.putBooking: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$body = ; // array[Booking] | 
$employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr

try {
    $api_instance->putBooking($body, $employeeKeyName);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->putBooking: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $body = [WWW::SwaggerClient::Object::array[Booking]->new()]; # array[Booking] | 
my $employeeKeyName = employeeKeyName_example; # String | One of persnr, badgenr, employeenr, registernr

eval { 
    $api_instance->putBooking(body => $body, employeeKeyName => $employeeKeyName);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->putBooking: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
body =  # array[Booking] | 
employeeKeyName = employeeKeyName_example # String | One of persnr, badgenr, employeenr, registernr

try: 
    # Puts booking for employee. File terminal License is needed
    api_instance.put_booking(body, employeeKeyName)
except ApiException as e:
    print("Exception when calling ExportServiceApi->putBooking: %s\n" % e)

Parameters

Header parameters
Name Description
employeeKeyName*
String
One of persnr, badgenr, employeenr, registernr
Required
Body parameters
Name Description
body *

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 5001 No Astrow License to access this option • 5002 Invalid date format • 5003 No key passed • 5005 Employees not found • 5008 General error • 5000 Could not login in Astrow

putDailyAbsence

Puts absence for employee.


/dailyabsence

Usage and SDK Samples

curl -X PUT -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/dailyabsence"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Absence] body = ; // array[Absence] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        String includeNonWorkingDays = includeNonWorkingDays_example; // String | Whether  to add absence in non working days
        String dBLanguageField = dBLanguageField_example; // String | Astrow DB Language Field
        try {
            apiInstance.putDailyAbsence(body, employeeKeyName, includeNonWorkingDays, dBLanguageField);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putDailyAbsence");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Absence] body = ; // array[Absence] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        String includeNonWorkingDays = includeNonWorkingDays_example; // String | Whether  to add absence in non working days
        String dBLanguageField = dBLanguageField_example; // String | Astrow DB Language Field
        try {
            apiInstance.putDailyAbsence(body, employeeKeyName, includeNonWorkingDays, dBLanguageField);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putDailyAbsence");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
array[Absence] *body = ; // 
String *employeeKeyName = employeeKeyName_example; // One of persnr, badgenr, employeenr, registernr
String *includeNonWorkingDays = includeNonWorkingDays_example; // Whether  to add absence in non working days
String *dBLanguageField = dBLanguageField_example; // Astrow DB Language Field

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Puts absence for employee.
[apiInstance putDailyAbsenceWith:body
    employeeKeyName:employeeKeyName
    includeNonWorkingDays:includeNonWorkingDays
    dBLanguageField:dBLanguageField
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var body = ; // {{array[Absence]}} 
var employeeKeyName = employeeKeyName_example; // {{String}} One of persnr, badgenr, employeenr, registernr
var includeNonWorkingDays = includeNonWorkingDays_example; // {{String}} Whether  to add absence in non working days
var dBLanguageField = dBLanguageField_example; // {{String}} Astrow DB Language Field

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.putDailyAbsence(bodyemployeeKeyNameincludeNonWorkingDaysdBLanguageField, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putDailyAbsenceExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var body = new array[Absence](); // array[Absence] | 
            var employeeKeyName = employeeKeyName_example;  // String | One of persnr, badgenr, employeenr, registernr
            var includeNonWorkingDays = includeNonWorkingDays_example;  // String | Whether  to add absence in non working days
            var dBLanguageField = dBLanguageField_example;  // String | Astrow DB Language Field

            try
            {
                // Puts absence for employee.
                apiInstance.putDailyAbsence(body, employeeKeyName, includeNonWorkingDays, dBLanguageField);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.putDailyAbsence: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$body = ; // array[Absence] | 
$employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
$includeNonWorkingDays = includeNonWorkingDays_example; // String | Whether  to add absence in non working days
$dBLanguageField = dBLanguageField_example; // String | Astrow DB Language Field

try {
    $api_instance->putDailyAbsence($body, $employeeKeyName, $includeNonWorkingDays, $dBLanguageField);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->putDailyAbsence: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $body = [WWW::SwaggerClient::Object::array[Absence]->new()]; # array[Absence] | 
my $employeeKeyName = employeeKeyName_example; # String | One of persnr, badgenr, employeenr, registernr
my $includeNonWorkingDays = includeNonWorkingDays_example; # String | Whether  to add absence in non working days
my $dBLanguageField = dBLanguageField_example; # String | Astrow DB Language Field

eval { 
    $api_instance->putDailyAbsence(body => $body, employeeKeyName => $employeeKeyName, includeNonWorkingDays => $includeNonWorkingDays, dBLanguageField => $dBLanguageField);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->putDailyAbsence: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
body =  # array[Absence] | 
employeeKeyName = employeeKeyName_example # String | One of persnr, badgenr, employeenr, registernr
includeNonWorkingDays = includeNonWorkingDays_example # String | Whether  to add absence in non working days
dBLanguageField = dBLanguageField_example # String | Astrow DB Language Field

try: 
    # Puts absence for employee.
    api_instance.put_daily_absence(body, employeeKeyName, includeNonWorkingDays, dBLanguageField)
except ApiException as e:
    print("Exception when calling ExportServiceApi->putDailyAbsence: %s\n" % e)

Parameters

Header parameters
Name Description
employeeKeyName*
String
One of persnr, badgenr, employeenr, registernr
Required
includeNonWorkingDays*
String
Whether to add absence in non working days
Required
DBLanguageField*
String
Astrow DB Language Field
Required
Body parameters
Name Description
body *

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 9001 Invalid DB language field • 8000 Invalid employee key • 5002 Invalid date format

putDailyBooking

Puts booking for employee. File terminal License is needed (OBSOLETE - please use booking/ path)


/dailybooking

Usage and SDK Samples

curl -X PUT -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/dailybooking"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Booking] body = ; // array[Booking] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.putDailyBooking(body, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putDailyBooking");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Booking] body = ; // array[Booking] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.putDailyBooking(body, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putDailyBooking");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
array[Booking] *body = ; // 
String *employeeKeyName = employeeKeyName_example; // One of persnr, badgenr, employeenr, registernr

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Puts booking for employee. File terminal License is needed (OBSOLETE - please use booking/ path)
[apiInstance putDailyBookingWith:body
    employeeKeyName:employeeKeyName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var body = ; // {{array[Booking]}} 
var employeeKeyName = employeeKeyName_example; // {{String}} One of persnr, badgenr, employeenr, registernr

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.putDailyBooking(bodyemployeeKeyName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putDailyBookingExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var body = new array[Booking](); // array[Booking] | 
            var employeeKeyName = employeeKeyName_example;  // String | One of persnr, badgenr, employeenr, registernr

            try
            {
                // Puts booking for employee. File terminal License is needed (OBSOLETE - please use booking/ path)
                apiInstance.putDailyBooking(body, employeeKeyName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.putDailyBooking: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$body = ; // array[Booking] | 
$employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr

try {
    $api_instance->putDailyBooking($body, $employeeKeyName);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->putDailyBooking: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $body = [WWW::SwaggerClient::Object::array[Booking]->new()]; # array[Booking] | 
my $employeeKeyName = employeeKeyName_example; # String | One of persnr, badgenr, employeenr, registernr

eval { 
    $api_instance->putDailyBooking(body => $body, employeeKeyName => $employeeKeyName);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->putDailyBooking: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
body =  # array[Booking] | 
employeeKeyName = employeeKeyName_example # String | One of persnr, badgenr, employeenr, registernr

try: 
    # Puts booking for employee. File terminal License is needed (OBSOLETE - please use booking/ path)
    api_instance.put_daily_booking(body, employeeKeyName)
except ApiException as e:
    print("Exception when calling ExportServiceApi->putDailyBooking: %s\n" % e)

Parameters

Header parameters
Name Description
employeeKeyName*
String
One of persnr, badgenr, employeenr, registernr
Required
Body parameters
Name Description
body *

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 5001 No Astrow License to access this option • 5002 Invalid date format • 5003 No key passed • 5005 Employees not found • 5008 General error • 5000 Could not login in Astrow

putEmployee

Add new employee. Import employee License is needed


/employee

Usage and SDK Samples

curl -X PUT -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/employee"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        Employee body = ; // Employee | 
        try {
            apiInstance.putEmployee(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putEmployee");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        Employee body = ; // Employee | 
        try {
            apiInstance.putEmployee(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putEmployee");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
Employee *body = ; // 

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Add new employee. Import employee License is needed
[apiInstance putEmployeeWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var body = ; // {{Employee}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.putEmployee(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putEmployeeExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var body = new Employee(); // Employee | 

            try
            {
                // Add new employee. Import employee License is needed
                apiInstance.putEmployee(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.putEmployee: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$body = ; // Employee | 

try {
    $api_instance->putEmployee($body);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->putEmployee: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $body = WWW::SwaggerClient::Object::Employee->new(); # Employee | 

eval { 
    $api_instance->putEmployee(body => $body);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->putEmployee: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
body =  # Employee | 

try: 
    # Add new employee. Import employee License is needed
    api_instance.put_employee(body)
except ApiException as e:
    print("Exception when calling ExportServiceApi->putEmployee: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 1000 Invalid employee key name • 1001 Invalid employee • 4000 Invalid badge • 4001 Pending change in progress • 4002 Cycle overlaps existing one • 4003 Paygroup overlaps existing one • 4004 Cycle not found • 4005 Paygroup not found • 4006 Company Site not found • 4007 Cost Group not found • 4008 Chop Group not found • 4009 Chop group overlaps existing one • 4010 Cost group overlaps existing one • 4011 Department overlaps existing one • 4012 Department not found

putSchedule

Puts schedule for employee.Schedule import License is needed


/schedule

Usage and SDK Samples

curl -X PUT -H "Authorization: Basic [[basicHash]]" "https://astrow.net/AstrowIntegrationWebService/v1/schedule"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportServiceApi;

import java.io.File;
import java.util.*;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Schedule] body = ; // array[Schedule] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.putSchedule(body, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putSchedule");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportServiceApi;

public class ExportServiceApiExample {

    public static void main(String[] args) {
        ExportServiceApi apiInstance = new ExportServiceApi();
        array[Schedule] body = ; // array[Schedule] | 
        String employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr
        try {
            apiInstance.putSchedule(body, employeeKeyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportServiceApi#putSchedule");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
array[Schedule] *body = ; // 
String *employeeKeyName = employeeKeyName_example; // One of persnr, badgenr, employeenr, registernr

ExportServiceApi *apiInstance = [[ExportServiceApi alloc] init];

// Puts schedule for employee.Schedule import License is needed
[apiInstance putScheduleWith:body
    employeeKeyName:employeeKeyName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AstrowCloudRestApi = require('astrow_cloud_rest_api');
var defaultClient = AstrowCloudRestApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new AstrowCloudRestApi.ExportServiceApi()
var body = ; // {{array[Schedule]}} 
var employeeKeyName = employeeKeyName_example; // {{String}} One of persnr, badgenr, employeenr, registernr

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.putSchedule(bodyemployeeKeyName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putScheduleExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ExportServiceApi();
            var body = new array[Schedule](); // array[Schedule] | 
            var employeeKeyName = employeeKeyName_example;  // String | One of persnr, badgenr, employeenr, registernr

            try
            {
                // Puts schedule for employee.Schedule import License is needed
                apiInstance.putSchedule(body, employeeKeyName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportServiceApi.putSchedule: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiExportServiceApi();
$body = ; // array[Schedule] | 
$employeeKeyName = employeeKeyName_example; // String | One of persnr, badgenr, employeenr, registernr

try {
    $api_instance->putSchedule($body, $employeeKeyName);
} catch (Exception $e) {
    echo 'Exception when calling ExportServiceApi->putSchedule: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportServiceApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ExportServiceApi->new();
my $body = [WWW::SwaggerClient::Object::array[Schedule]->new()]; # array[Schedule] | 
my $employeeKeyName = employeeKeyName_example; # String | One of persnr, badgenr, employeenr, registernr

eval { 
    $api_instance->putSchedule(body => $body, employeeKeyName => $employeeKeyName);
};
if ($@) {
    warn "Exception when calling ExportServiceApi->putSchedule: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ExportServiceApi()
body =  # array[Schedule] | 
employeeKeyName = employeeKeyName_example # String | One of persnr, badgenr, employeenr, registernr

try: 
    # Puts schedule for employee.Schedule import License is needed
    api_instance.put_schedule(body, employeeKeyName)
except ApiException as e:
    print("Exception when calling ExportServiceApi->putSchedule: %s\n" % e)

Parameters

Header parameters
Name Description
employeeKeyName*
String
One of persnr, badgenr, employeenr, registernr
Required
Body parameters
Name Description
body *

Responses

Status: 200

OK

Status: 400

Error codes: • 9000 Internal Server error • 5001 No Astrow License to access this option • 5002 Invalid date format • 5003 No key passed • 5004 Multiple employees found • 5005 Employees not found • 5006 Day program does not exists • 5007 General error • 5008 General error • 5000 Could not login in Astrow