Republica Image API

Default

getGeneratedPhotoOfferId

Returns an image based on the exact offer ID and sizes.


/photocombinations/offers/{offer_id}/generations/{generation_id}

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: image/png,application/json"\
"https://imageservice2.republica.dk//photocombinations/offers/{offer_id}/generations/{generation_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String offerId = offerId_example; // String | 
        String generationId = generationId_example; // String | 
        try {
            byte[] result = apiInstance.getGeneratedPhotoOfferId(offerId, generationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getGeneratedPhotoOfferId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String offerId = offerId_example; // String | 
        String generationId = generationId_example; // String | 
        try {
            byte[] result = apiInstance.getGeneratedPhotoOfferId(offerId, generationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getGeneratedPhotoOfferId");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *offerId = offerId_example; // 
String *generationId = generationId_example; // 

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

[apiInstance getGeneratedPhotoOfferIdWith:offerId
    generationId:generationId
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var offerId = offerId_example; // {{String}} 
var generationId = generationId_example; // {{String}} 

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

namespace Example
{
    public class getGeneratedPhotoOfferIdExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var offerId = offerId_example;  // String | 
            var generationId = generationId_example;  // String | 

            try
            {
                byte[] result = apiInstance.getGeneratedPhotoOfferId(offerId, generationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getGeneratedPhotoOfferId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$offerId = offerId_example; // String | 
$generationId = generationId_example; // String | 

try {
    $result = $api_instance->getGeneratedPhotoOfferId($offerId, $generationId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getGeneratedPhotoOfferId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $offerId = offerId_example; # String | 
my $generationId = generationId_example; # String | 

eval { 
    my $result = $api_instance->getGeneratedPhotoOfferId(offerId => $offerId, generationId => $generationId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getGeneratedPhotoOfferId: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
offerId = offerId_example # String | 
generationId = generationId_example # String | 

try: 
    api_response = api_instance.get_generated_photo_offer_id(offerId, generationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getGeneratedPhotoOfferId: %s\n" % e)

Parameters

Path parameters
Name Description
offer_id*
String
Required
generation_id*
String
Required

Responses

Status: 200 - Image data ready for use with correct Content-Type headers.

Status: 400 - The parameters are not correct. offer_id and generation_id have to be valid.

Status: 500 - Something went wrong internally. The issue has been logged.

Name Type Format Description
X-Error String

getImageByEAN

Get a image based on EAN (GTIN). Returns one image.


/image/ean/{ean}

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: image/jpeg,image/png"\
"https://imageservice2.republica.dk//image/ean/{ean}?format=&trim=&keep_shadow=&fill=&size=&height=&width="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | 
        String format = format_example; // String | Compression format, "jpg" and "png" supported.
        Integer trim = 56; // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
        Integer keepShadow = 56; // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
        String fill = fill_example; // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
        Integer size = 56; // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
        Integer height = 56; // Integer | Max height of the requested image. Images will never be scaled up.
        Integer width = 56; // Integer | Max width of the requested image. Images will never be scaled up.
        try {
            byte[] result = apiInstance.getImageByEAN(ean, format, trim, keepShadow, fill, size, height, width);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImageByEAN");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | 
        String format = format_example; // String | Compression format, "jpg" and "png" supported.
        Integer trim = 56; // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
        Integer keepShadow = 56; // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
        String fill = fill_example; // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
        Integer size = 56; // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
        Integer height = 56; // Integer | Max height of the requested image. Images will never be scaled up.
        Integer width = 56; // Integer | Max width of the requested image. Images will never be scaled up.
        try {
            byte[] result = apiInstance.getImageByEAN(ean, format, trim, keepShadow, fill, size, height, width);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImageByEAN");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *ean = ean_example; // 
String *format = format_example; // Compression format, "jpg" and "png" supported. (optional)
Integer *trim = 56; // Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1. (optional) (default to 1)
Integer *keepShadow = 56; // Experimental. Try to keep original shadow while clipping. 0 or 1. (optional) (default to 0)
String *fill = fill_example; // Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg. (optional) (default to ffffff)
Integer *size = 56; // Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set. (optional) (default to 200)
Integer *height = 56; // Max height of the requested image. Images will never be scaled up. (optional)
Integer *width = 56; // Max width of the requested image. Images will never be scaled up. (optional)

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

[apiInstance getImageByEANWith:ean
    format:format
    trim:trim
    keepShadow:keepShadow
    fill:fill
    size:size
    height:height
    width:width
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var ean = ean_example; // {{String}} 
var opts = { 
  'format': format_example, // {{String}} Compression format, "jpg" and "png" supported.
  'trim': 56, // {{Integer}} Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
  'keepShadow': 56, // {{Integer}} Experimental. Try to keep original shadow while clipping. 0 or 1.
  'fill': fill_example, // {{String}} Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
  'size': 56, // {{Integer}} Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
  'height': 56, // {{Integer}} Max height of the requested image. Images will never be scaled up.
  'width': 56 // {{Integer}} Max width of the requested image. Images will never be scaled up.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getImageByEAN(ean, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getImageByEANExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var ean = ean_example;  // String | 
            var format = format_example;  // String | Compression format, "jpg" and "png" supported. (optional) 
            var trim = 56;  // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1. (optional)  (default to 1)
            var keepShadow = 56;  // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1. (optional)  (default to 0)
            var fill = fill_example;  // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg. (optional)  (default to ffffff)
            var size = 56;  // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set. (optional)  (default to 200)
            var height = 56;  // Integer | Max height of the requested image. Images will never be scaled up. (optional) 
            var width = 56;  // Integer | Max width of the requested image. Images will never be scaled up. (optional) 

            try
            {
                byte[] result = apiInstance.getImageByEAN(ean, format, trim, keepShadow, fill, size, height, width);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getImageByEAN: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$ean = ean_example; // String | 
$format = format_example; // String | Compression format, "jpg" and "png" supported.
$trim = 56; // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
$keepShadow = 56; // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
$fill = fill_example; // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
$size = 56; // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
$height = 56; // Integer | Max height of the requested image. Images will never be scaled up.
$width = 56; // Integer | Max width of the requested image. Images will never be scaled up.

try {
    $result = $api_instance->getImageByEAN($ean, $format, $trim, $keepShadow, $fill, $size, $height, $width);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getImageByEAN: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $ean = ean_example; # String | 
my $format = format_example; # String | Compression format, "jpg" and "png" supported.
my $trim = 56; # Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
my $keepShadow = 56; # Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
my $fill = fill_example; # String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
my $size = 56; # Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
my $height = 56; # Integer | Max height of the requested image. Images will never be scaled up.
my $width = 56; # Integer | Max width of the requested image. Images will never be scaled up.

eval { 
    my $result = $api_instance->getImageByEAN(ean => $ean, format => $format, trim => $trim, keepShadow => $keepShadow, fill => $fill, size => $size, height => $height, width => $width);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getImageByEAN: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
ean = ean_example # String | 
format = format_example # String | Compression format, "jpg" and "png" supported. (optional)
trim = 56 # Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1. (optional) (default to 1)
keepShadow = 56 # Integer | Experimental. Try to keep original shadow while clipping. 0 or 1. (optional) (default to 0)
fill = fill_example # String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg. (optional) (default to ffffff)
size = 56 # Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set. (optional) (default to 200)
height = 56 # Integer | Max height of the requested image. Images will never be scaled up. (optional)
width = 56 # Integer | Max width of the requested image. Images will never be scaled up. (optional)

try: 
    api_response = api_instance.get_image_by_ean(ean, format=format, trim=trim, keepShadow=keepShadow, fill=fill, size=size, height=height, width=width)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getImageByEAN: %s\n" % e)

Parameters

Path parameters
Name Description
ean*
String
Required
Query parameters
Name Description
format
String
Compression format, "jpg" and "png" supported.
trim
Integer
Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
keep_shadow
Integer
Experimental. Try to keep original shadow while clipping. 0 or 1.
fill
String
Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
size
Integer
Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
height
Integer
Max height of the requested image. Images will never be scaled up.
width
Integer
Max width of the requested image. Images will never be scaled up.

Responses

Status: 200 - Image data ready for use with correct Content-Type headers.

Status: 404 - The image is unavailable for one of several reasons. Content is 1x1px transparent PNG so it can still be used directly in <img> tag.

Name Type Format Description
X-Error String

Status: 500 - Something went wrong internally. The issue has been logged. Still returns 1x1px transparent PNG.

Name Type Format Description
X-Error String

Status: 503 - The image service was unable to reach the data service to get an EAN translated to a motiv_id. Try again later. Still returns 1x1px transparent PNG.

Name Type Format Description
X-Error String

getImageByMotiveId

Return a image based on the exact Motive ID


/motive/{motive_id}

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: image/jpeg,image/png"\
"https://imageservice2.republica.dk//motive/{motive_id}?format=&trim=&keep_shadow=&fill=&size=&height=&width="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String motiveId = motiveId_example; // String | 
        String format = format_example; // String | Compression format, "jpg" and "png" supported.
        Integer trim = 56; // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
        Integer keepShadow = 56; // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
        String fill = fill_example; // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
        Integer size = 56; // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
        Integer height = 56; // Integer | Max height of the requested image. Images will never be scaled up.
        Integer width = 56; // Integer | Max width of the requested image. Images will never be scaled up.
        try {
            byte[] result = apiInstance.getImageByMotiveId(motiveId, format, trim, keepShadow, fill, size, height, width);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImageByMotiveId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String motiveId = motiveId_example; // String | 
        String format = format_example; // String | Compression format, "jpg" and "png" supported.
        Integer trim = 56; // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
        Integer keepShadow = 56; // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
        String fill = fill_example; // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
        Integer size = 56; // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
        Integer height = 56; // Integer | Max height of the requested image. Images will never be scaled up.
        Integer width = 56; // Integer | Max width of the requested image. Images will never be scaled up.
        try {
            byte[] result = apiInstance.getImageByMotiveId(motiveId, format, trim, keepShadow, fill, size, height, width);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImageByMotiveId");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *motiveId = motiveId_example; // 
String *format = format_example; // Compression format, "jpg" and "png" supported. (optional)
Integer *trim = 56; // Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1. (optional) (default to 1)
Integer *keepShadow = 56; // Experimental. Try to keep original shadow while clipping. 0 or 1. (optional) (default to 0)
String *fill = fill_example; // Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg. (optional) (default to ffffff)
Integer *size = 56; // Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set. (optional) (default to 200)
Integer *height = 56; // Max height of the requested image. Images will never be scaled up. (optional)
Integer *width = 56; // Max width of the requested image. Images will never be scaled up. (optional)

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

[apiInstance getImageByMotiveIdWith:motiveId
    format:format
    trim:trim
    keepShadow:keepShadow
    fill:fill
    size:size
    height:height
    width:width
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var motiveId = motiveId_example; // {{String}} 
var opts = { 
  'format': format_example, // {{String}} Compression format, "jpg" and "png" supported.
  'trim': 56, // {{Integer}} Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
  'keepShadow': 56, // {{Integer}} Experimental. Try to keep original shadow while clipping. 0 or 1.
  'fill': fill_example, // {{String}} Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
  'size': 56, // {{Integer}} Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
  'height': 56, // {{Integer}} Max height of the requested image. Images will never be scaled up.
  'width': 56 // {{Integer}} Max width of the requested image. Images will never be scaled up.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getImageByMotiveId(motiveId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getImageByMotiveIdExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var motiveId = motiveId_example;  // String | 
            var format = format_example;  // String | Compression format, "jpg" and "png" supported. (optional) 
            var trim = 56;  // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1. (optional)  (default to 1)
            var keepShadow = 56;  // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1. (optional)  (default to 0)
            var fill = fill_example;  // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg. (optional)  (default to ffffff)
            var size = 56;  // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set. (optional)  (default to 200)
            var height = 56;  // Integer | Max height of the requested image. Images will never be scaled up. (optional) 
            var width = 56;  // Integer | Max width of the requested image. Images will never be scaled up. (optional) 

            try
            {
                byte[] result = apiInstance.getImageByMotiveId(motiveId, format, trim, keepShadow, fill, size, height, width);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getImageByMotiveId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$motiveId = motiveId_example; // String | 
$format = format_example; // String | Compression format, "jpg" and "png" supported.
$trim = 56; // Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
$keepShadow = 56; // Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
$fill = fill_example; // String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
$size = 56; // Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
$height = 56; // Integer | Max height of the requested image. Images will never be scaled up.
$width = 56; // Integer | Max width of the requested image. Images will never be scaled up.

try {
    $result = $api_instance->getImageByMotiveId($motiveId, $format, $trim, $keepShadow, $fill, $size, $height, $width);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getImageByMotiveId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $motiveId = motiveId_example; # String | 
my $format = format_example; # String | Compression format, "jpg" and "png" supported.
my $trim = 56; # Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
my $keepShadow = 56; # Integer | Experimental. Try to keep original shadow while clipping. 0 or 1.
my $fill = fill_example; # String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
my $size = 56; # Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
my $height = 56; # Integer | Max height of the requested image. Images will never be scaled up.
my $width = 56; # Integer | Max width of the requested image. Images will never be scaled up.

eval { 
    my $result = $api_instance->getImageByMotiveId(motiveId => $motiveId, format => $format, trim => $trim, keepShadow => $keepShadow, fill => $fill, size => $size, height => $height, width => $width);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getImageByMotiveId: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
motiveId = motiveId_example # String | 
format = format_example # String | Compression format, "jpg" and "png" supported. (optional)
trim = 56 # Integer | Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1. (optional) (default to 1)
keepShadow = 56 # Integer | Experimental. Try to keep original shadow while clipping. 0 or 1. (optional) (default to 0)
fill = fill_example # String | Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg. (optional) (default to ffffff)
size = 56 # Integer | Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set. (optional) (default to 200)
height = 56 # Integer | Max height of the requested image. Images will never be scaled up. (optional)
width = 56 # Integer | Max width of the requested image. Images will never be scaled up. (optional)

try: 
    api_response = api_instance.get_image_by_motive_id(motiveId, format=format, trim=trim, keepShadow=keepShadow, fill=fill, size=size, height=height, width=width)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getImageByMotiveId: %s\n" % e)

Parameters

Path parameters
Name Description
motive_id*
String
Required
Query parameters
Name Description
format
String
Compression format, "jpg" and "png" supported.
trim
Integer
Clip path and trim image. Mutually exclusive with keep_shadow. 0 or 1.
keep_shadow
Integer
Experimental. Try to keep original shadow while clipping. 0 or 1.
fill
String
Fill transparent areas with this color. 6-digit hex color format without \#. Defaults to null (transparent) for png, white for jpg.
size
Integer
Size acts as a max for both width and height. Its default is 200 ONLY if neither width nor height is set.
height
Integer
Max height of the requested image. Images will never be scaled up.
width
Integer
Max width of the requested image. Images will never be scaled up.

Responses

Status: 200 - Image data ready for use with correct Content-Type headers.

Status: 404 - The image is unavailable for one of several reasons. Content is 1x1px transparent PNG so it can still be used directly in <img> tag.

Name Type Format Description
X-Error String

Status: 500 - Something went wrong internally. The issue has been logged. Still returns 1x1px transparent PNG.

Name Type Format Description
X-Error String

getImagesByEAN

Returns a list of image Motive IDs that is found on a EAN (GTIN). Returns all images found.


/images/ean/{ean}

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://imageservice2.republica.dk//images/ean/{ean}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | 
        try {
            'String' result = apiInstance.getImagesByEAN(ean);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImagesByEAN");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | 
        try {
            'String' result = apiInstance.getImagesByEAN(ean);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImagesByEAN");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *ean = ean_example; // 

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

[apiInstance getImagesByEANWith:ean
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var ean = ean_example; // {{String}} 

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

namespace Example
{
    public class getImagesByEANExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var ean = ean_example;  // String | 

            try
            {
                'String' result = apiInstance.getImagesByEAN(ean);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getImagesByEAN: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$ean = ean_example; // String | 

try {
    $result = $api_instance->getImagesByEAN($ean);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getImagesByEAN: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $ean = ean_example; # String | 

eval { 
    my $result = $api_instance->getImagesByEAN(ean => $ean);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getImagesByEAN: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
ean = ean_example # String | 

try: 
    api_response = api_instance.get_images_by_ean(ean)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getImagesByEAN: %s\n" % e)

Parameters

Path parameters
Name Description
ean*
String
Required

Responses

Status: 200 - Motiv and valid dates

Status: 500 - Something went wrong internally. The issue has been logged.


getImagesByEAN_v2

Returns a list of image Motive IDs that is found on a EAN (GTIN). Returns all images found. Includes valid start and end date for each image


/v2/images/ean/{ean}

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://imageservice2.republica.dk//v2/images/ean/{ean}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | 
        try {
            'String' result = apiInstance.getImagesByEAN_v2(ean);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImagesByEAN_v2");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | 
        try {
            'String' result = apiInstance.getImagesByEAN_v2(ean);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getImagesByEAN_v2");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *ean = ean_example; // 

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

[apiInstance getImagesByEAN_v2With:ean
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var ean = ean_example; // {{String}} 

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

namespace Example
{
    public class getImagesByEAN_v2Example
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var ean = ean_example;  // String | 

            try
            {
                'String' result = apiInstance.getImagesByEAN_v2(ean);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getImagesByEAN_v2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$ean = ean_example; // String | 

try {
    $result = $api_instance->getImagesByEAN_v2($ean);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getImagesByEAN_v2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $ean = ean_example; # String | 

eval { 
    my $result = $api_instance->getImagesByEAN_v2(ean => $ean);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getImagesByEAN_v2: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
ean = ean_example # String | 

try: 
    api_response = api_instance.get_images_by_ean_v2(ean)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getImagesByEAN_v2: %s\n" % e)

Parameters

Path parameters
Name Description
ean*
String
Required

Responses

Status: 200 - List of motives with valid to and from dates

Status: 500 - Something went wrong internally. The issue has been logged.


getMotivData

Returns valid to and from dates for the chosen image


/motive/{motive_id}/info

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://imageservice2.republica.dk//motive/{motive_id}/info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String motiveId = motiveId_example; // String | 
        try {
            'String' result = apiInstance.getMotivData(motiveId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getMotivData");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String motiveId = motiveId_example; // String | 
        try {
            'String' result = apiInstance.getMotivData(motiveId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getMotivData");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *motiveId = motiveId_example; // 

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

[apiInstance getMotivDataWith:motiveId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var motiveId = motiveId_example; // {{String}} 

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

namespace Example
{
    public class getMotivDataExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var motiveId = motiveId_example;  // String | 

            try
            {
                'String' result = apiInstance.getMotivData(motiveId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getMotivData: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$motiveId = motiveId_example; // String | 

try {
    $result = $api_instance->getMotivData($motiveId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getMotivData: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $motiveId = motiveId_example; # String | 

eval { 
    my $result = $api_instance->getMotivData(motiveId => $motiveId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getMotivData: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
motiveId = motiveId_example # String | 

try: 
    api_response = api_instance.get_motiv_data(motiveId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getMotivData: %s\n" % e)

Parameters

Path parameters
Name Description
motive_id*
String
Required

Responses

Status: 200 - List of motive-ids

Status: 400 - Bad request. Usually wrong format

Status: 404 - Motiv not found

Status: 500 - Something went wrong internally. The issue has been logged.


getOfferCombination

Returns a JSON representing the resulting image based on the exact offer ID and sizes.


/photocombinations/offers/{offer_id}

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://imageservice2.republica.dk//photocombinations/offers/{offer_id}?width=&height="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String offerId = offerId_example; // String | 
        Integer width = 56; // Integer | Image result width
        Integer height = 56; // Integer | Image result height
        try {
            'String' result = apiInstance.getOfferCombination(offerId, width, height);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOfferCombination");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String offerId = offerId_example; // String | 
        Integer width = 56; // Integer | Image result width
        Integer height = 56; // Integer | Image result height
        try {
            'String' result = apiInstance.getOfferCombination(offerId, width, height);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOfferCombination");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *offerId = offerId_example; // 
Integer *width = 56; // Image result width
Integer *height = 56; // Image result height

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

[apiInstance getOfferCombinationWith:offerId
    width:width
    height:height
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var offerId = offerId_example; // {{String}} 
var width = 56; // {{Integer}} Image result width
var height = 56; // {{Integer}} Image result height

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

namespace Example
{
    public class getOfferCombinationExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var offerId = offerId_example;  // String | 
            var width = 56;  // Integer | Image result width
            var height = 56;  // Integer | Image result height

            try
            {
                'String' result = apiInstance.getOfferCombination(offerId, width, height);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getOfferCombination: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$offerId = offerId_example; // String | 
$width = 56; // Integer | Image result width
$height = 56; // Integer | Image result height

try {
    $result = $api_instance->getOfferCombination($offerId, $width, $height);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getOfferCombination: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $offerId = offerId_example; # String | 
my $width = 56; # Integer | Image result width
my $height = 56; # Integer | Image result height

eval { 
    my $result = $api_instance->getOfferCombination(offerId => $offerId, width => $width, height => $height);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getOfferCombination: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
offerId = offerId_example # String | 
width = 56 # Integer | Image result width
height = 56 # Integer | Image result height

try: 
    api_response = api_instance.get_offer_combination(offerId, width, height)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getOfferCombination: %s\n" % e)

Parameters

Path parameters
Name Description
offer_id*
String
Required
Query parameters
Name Description
width*
Integer
Image result width
Required
height*
Integer
Image result height
Required

Responses

Status: 201 - JSON specifying image created, ready for use, and available at Url property.

Status: 400 - The parameters are not correct. Offer id, width and height have to be specified. Example: '.../offers/1750047?width=400&height=400'.

Status: 404 - The offer can not be found.

Status: 500 - Something went wrong internally. The issue has been logged.

Name Type Format Description
X-Error String

getOfferCombinationIFeelLucky

Returns an image based on the exact offer ID and sizes.


/photocombinations/offers/{offer_id}/ifeellucky

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: image/png,application/json"\
"https://imageservice2.republica.dk//photocombinations/offers/{offer_id}/ifeellucky?width=&height="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String offerId = offerId_example; // String | 
        Integer width = 56; // Integer | Image result width
        Integer height = 56; // Integer | Image result height
        try {
            byte[] result = apiInstance.getOfferCombinationIFeelLucky(offerId, width, height);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOfferCombinationIFeelLucky");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String offerId = offerId_example; // String | 
        Integer width = 56; // Integer | Image result width
        Integer height = 56; // Integer | Image result height
        try {
            byte[] result = apiInstance.getOfferCombinationIFeelLucky(offerId, width, height);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOfferCombinationIFeelLucky");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *offerId = offerId_example; // 
Integer *width = 56; // Image result width
Integer *height = 56; // Image result height

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

[apiInstance getOfferCombinationIFeelLuckyWith:offerId
    width:width
    height:height
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var offerId = offerId_example; // {{String}} 
var width = 56; // {{Integer}} Image result width
var height = 56; // {{Integer}} Image result height

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

namespace Example
{
    public class getOfferCombinationIFeelLuckyExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var offerId = offerId_example;  // String | 
            var width = 56;  // Integer | Image result width
            var height = 56;  // Integer | Image result height

            try
            {
                byte[] result = apiInstance.getOfferCombinationIFeelLucky(offerId, width, height);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getOfferCombinationIFeelLucky: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$offerId = offerId_example; // String | 
$width = 56; // Integer | Image result width
$height = 56; // Integer | Image result height

try {
    $result = $api_instance->getOfferCombinationIFeelLucky($offerId, $width, $height);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getOfferCombinationIFeelLucky: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $offerId = offerId_example; # String | 
my $width = 56; # Integer | Image result width
my $height = 56; # Integer | Image result height

eval { 
    my $result = $api_instance->getOfferCombinationIFeelLucky(offerId => $offerId, width => $width, height => $height);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getOfferCombinationIFeelLucky: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
offerId = offerId_example # String | 
width = 56 # Integer | Image result width
height = 56 # Integer | Image result height

try: 
    api_response = api_instance.get_offer_combination_i_feel_lucky(offerId, width, height)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getOfferCombinationIFeelLucky: %s\n" % e)

Parameters

Path parameters
Name Description
offer_id*
String
Required
Query parameters
Name Description
width*
Integer
Image result width
Required
height*
Integer
Image result height
Required

Responses

Status: 200 - Image data ready for use with correct Content-Type headers.

Status: 400 - The parameters are not correct. Offer id, width, and height have to be specified. Example: '.../offers/1750047?width=400&height=400'.

Status: 404 - The offer can not be found.

Status: 500 - Something went wrong internally. The issue has been logged.

Name Type Format Description
X-Error String

getPublicationFrontPage

Returns an image in perspective angle, representing the first page of the indicated code publication PDF.


/publications/jobnumber/{jobnumber}/frontpage

Usage and SDK Samples

curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: image/png,application/json"\
"https://imageservice2.republica.dk//publications/jobnumber/{jobnumber}/frontpage"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        Integer jobnumber = 56; // Integer | 
        try {
            byte[] result = apiInstance.getPublicationFrontPage(jobnumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getPublicationFrontPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer jobnumber = 56; // Integer | 
        try {
            byte[] result = apiInstance.getPublicationFrontPage(jobnumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getPublicationFrontPage");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
Integer *jobnumber = 56; // 

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

[apiInstance getPublicationFrontPageWith:jobnumber
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var jobnumber = 56; // {{Integer}} 

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

namespace Example
{
    public class getPublicationFrontPageExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var jobnumber = 56;  // Integer | 

            try
            {
                byte[] result = apiInstance.getPublicationFrontPage(jobnumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getPublicationFrontPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$jobnumber = 56; // Integer | 

try {
    $result = $api_instance->getPublicationFrontPage($jobnumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getPublicationFrontPage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $jobnumber = 56; # Integer | 

eval { 
    my $result = $api_instance->getPublicationFrontPage(jobnumber => $jobnumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getPublicationFrontPage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
jobnumber = 56 # Integer | 

try: 
    api_response = api_instance.get_publication_front_page(jobnumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getPublicationFrontPage: %s\n" % e)

Parameters

Path parameters
Name Description
jobnumber*
Integer
Required

Responses

Status: 200 - Image data ready for use with correct Content-Type headers.

Status: 409 - The parameters are not correct. Jobnumber is not valid or the publication PDF does not exist.

Status: 500 - Something went wrong at the service.

Name Type Format Description
X-Error String

postOfferCombination

Returns a JSON representing the result image based on the exact offer ID and sizes.


/photocombinations/offers

Usage and SDK Samples

curl -X POST\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://imageservice2.republica.dk//photocombinations/offers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        Photocombinations_offers_body body = {
  "excludeMotives" : [ "349-9627" ],
  "height" : 400,
  "maxMotives" : 2,
  "offerId" : "1769192",
  "width" : 600
}; // Photocombinations_offers_body | 
        try {
            'String' result = apiInstance.postOfferCombination(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#postOfferCombination");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Photocombinations_offers_body body = {
  "excludeMotives" : [ "349-9627" ],
  "height" : 400,
  "maxMotives" : 2,
  "offerId" : "1769192",
  "width" : 600
}; // Photocombinations_offers_body | 
        try {
            'String' result = apiInstance.postOfferCombination(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#postOfferCombination");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
Photocombinations_offers_body *body = {
  "excludeMotives" : [ "349-9627" ],
  "height" : 400,
  "maxMotives" : 2,
  "offerId" : "1769192",
  "width" : 600
}; //  (optional)

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

[apiInstance postOfferCombinationWith:body
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var opts = { 
  'body': {
  "excludeMotives" : [ "349-9627" ],
  "height" : 400,
  "maxMotives" : 2,
  "offerId" : "1769192",
  "width" : 600
} // {{Photocombinations_offers_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postOfferCombination(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postOfferCombinationExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var body = new Photocombinations_offers_body(); // Photocombinations_offers_body |  (optional) 

            try
            {
                'String' result = apiInstance.postOfferCombination(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.postOfferCombination: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = {
  "excludeMotives" : [ "349-9627" ],
  "height" : 400,
  "maxMotives" : 2,
  "offerId" : "1769192",
  "width" : 600
}; // Photocombinations_offers_body | 

try {
    $result = $api_instance->postOfferCombination($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->postOfferCombination: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

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

eval { 
    my $result = $api_instance->postOfferCombination(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->postOfferCombination: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body = {
  "excludeMotives" : [ "349-9627" ],
  "height" : 400,
  "maxMotives" : 2,
  "offerId" : "1769192",
  "width" : 600
} # Photocombinations_offers_body |  (optional)

try: 
    api_response = api_instance.post_offer_combination(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->postOfferCombination: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - JSON specifying image created, ready for use, and available at Url property.

Status: 400 - The parameters are not correct. Offer id, width and height have to be specified. Example: '.../offers/1750047?width=400&height=400'.

Status: 404 - The offer can not be found.

Status: 500 - Something went wrong internally. The issue has been logged.

Name Type Format Description
X-Error String

postOfferCombinationsBatch

Returns a JSON representing a queue of images to combine based on the exact offer ID, sizes and options.


/photocombinations/offers/batch

Usage and SDK Samples

curl -X POST\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://imageservice2.republica.dk//photocombinations/offers/batch"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        array[Object] body = [ {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "396-6806" ],
  "height" : 600,
  "maxMotives" : 2,
  "offerId" : "1750098",
  "width" : 800
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "372-3742" ],
  "height" : 400,
  "maxMotives" : 3,
  "offerId" : "1750100",
  "width" : 300
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "height" : 500,
  "offerId" : "17500939",
  "width" : 600
} ]; // array[Object] | 
        try {
            'String' result = apiInstance.postOfferCombinationsBatch(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#postOfferCombinationsBatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Object] body = [ {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "396-6806" ],
  "height" : 600,
  "maxMotives" : 2,
  "offerId" : "1750098",
  "width" : 800
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "372-3742" ],
  "height" : 400,
  "maxMotives" : 3,
  "offerId" : "1750100",
  "width" : 300
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "height" : 500,
  "offerId" : "17500939",
  "width" : 600
} ]; // array[Object] | 
        try {
            'String' result = apiInstance.postOfferCombinationsBatch(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#postOfferCombinationsBatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
array[Object] *body = [ {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "396-6806" ],
  "height" : 600,
  "maxMotives" : 2,
  "offerId" : "1750098",
  "width" : 800
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "372-3742" ],
  "height" : 400,
  "maxMotives" : 3,
  "offerId" : "1750100",
  "width" : 300
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "height" : 500,
  "offerId" : "17500939",
  "width" : 600
} ]; //  (optional)

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

[apiInstance postOfferCombinationsBatchWith:body
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaImageApi = require('republica_image_api');
var defaultClient = RepublicaImageApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new RepublicaImageApi.DefaultApi()
var opts = { 
  'body': [ {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "396-6806" ],
  "height" : 600,
  "maxMotives" : 2,
  "offerId" : "1750098",
  "width" : 800
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "372-3742" ],
  "height" : 400,
  "maxMotives" : 3,
  "offerId" : "1750100",
  "width" : 300
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "height" : 500,
  "offerId" : "17500939",
  "width" : 600
} ] // {{array[Object]}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postOfferCombinationsBatch(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postOfferCombinationsBatchExample
    {
        public void main()
        {

            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var body = new array[Object](); // array[Object] |  (optional) 

            try
            {
                'String' result = apiInstance.postOfferCombinationsBatch(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.postOfferCombinationsBatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = [ {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "396-6806" ],
  "height" : 600,
  "maxMotives" : 2,
  "offerId" : "1750098",
  "width" : 800
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "372-3742" ],
  "height" : 400,
  "maxMotives" : 3,
  "offerId" : "1750100",
  "width" : 300
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "height" : 500,
  "offerId" : "17500939",
  "width" : 600
} ]; // array[Object] | 

try {
    $result = $api_instance->postOfferCombinationsBatch($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->postOfferCombinationsBatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = [WWW::SwaggerClient::Object::array[Object]->new()]; # array[Object] | 

eval { 
    my $result = $api_instance->postOfferCombinationsBatch(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->postOfferCombinationsBatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body = [ {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "396-6806" ],
  "height" : 600,
  "maxMotives" : 2,
  "offerId" : "1750098",
  "width" : 800
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "excludeMotives" : [ "372-3742" ],
  "height" : 400,
  "maxMotives" : 3,
  "offerId" : "1750100",
  "width" : 300
}, {
  "callbackEndpoint" : "http://example.com/photocomplete",
  "height" : 500,
  "offerId" : "17500939",
  "width" : 600
} ] # array[Object] |  (optional)

try: 
    api_response = api_instance.post_offer_combinations_batch(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->postOfferCombinationsBatch: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 202 - JSON with a collection specifying acceptance of images in the queue to combine images. The callback payload will be delivered with a POST method to the specified callbackEndpoint property.

Status: 500 - Something went wrong internally. The issue has been logged.

Name Type Format Description
X-Error String