Republica API

Default

getCatalogByEANs


/ean/all

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/ean/all?q="
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String q = q_example; // String | Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta
        try {
            apiInstance.getCatalogByEANs(q);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogByEANs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String q = q_example; // String | Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta
        try {
            apiInstance.getCatalogByEANs(q);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogByEANs");
            e.printStackTrace();
        }
    }
}
String *q = q_example; // Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta

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

[apiInstance getCatalogByEANsWith:q
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var q = q_example; // {{String}} Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta

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

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

            var apiInstance = new DefaultApi();
            var q = q_example;  // String | Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta

            try
            {
                apiInstance.getCatalogByEANs(q);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getCatalogByEANs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$q = q_example; // String | Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $q = q_example; # String | Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
q = q_example # String | Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta

try: 
    api_instance.get_catalog_by_eans(q)
except ApiException as e:
    print("Exception when calling DefaultApi->getCatalogByEANs: %s\n" % e)

Parameters

Query parameters
Name Description
q*
String
Pipe seperated list of EAN numbers Eg: 8033765258128|C5750000104851|C7804320706009 - ONLY Fakta
Required

Responses

Status: 200 - List of offers in current catalog filtered by EAN(s)


getCatalogFeedById


/feed/id/{id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/feed/id/{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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String id = id_example; // String | Perma-id of a particular catalog. Get ids with /feed
        try {
            apiInstance.getCatalogFeedById(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogFeedById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String id = id_example; // String | Perma-id of a particular catalog. Get ids with /feed
        try {
            apiInstance.getCatalogFeedById(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogFeedById");
            e.printStackTrace();
        }
    }
}
String *id = id_example; // Perma-id of a particular catalog. Get ids with /feed

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

[apiInstance getCatalogFeedByIdWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var id = id_example; // {{String}} Perma-id of a particular catalog. Get ids with /feed

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

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

            var apiInstance = new DefaultApi();
            var id = id_example;  // String | Perma-id of a particular catalog. Get ids with /feed

            try
            {
                apiInstance.getCatalogFeedById(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getCatalogFeedById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$id = id_example; // String | Perma-id of a particular catalog. Get ids with /feed

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $id = id_example; # String | Perma-id of a particular catalog. Get ids with /feed

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
id = id_example # String | Perma-id of a particular catalog. Get ids with /feed

try: 
    api_instance.get_catalog_feed_by_id(id)
except ApiException as e:
    print("Exception when calling DefaultApi->getCatalogFeedById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
Perma-id of a particular catalog. Get ids with /feed
Required

Responses

Status: 200 - Data for the requested catalog.

Status: 400 - Bad request. Missing or invalid parameters provided.

Status: 403 - Forbidden. Access to the requested feed is restricted.


getCatalogFeedByWeek


/feed/week/{organization}/{week_modifier}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/feed/week/{organization}/{week_modifier}"
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String organization = organization_example; // String | Organization name, lower case. E.g. "superbrugsen"
        Integer weekModifier = 56; // Integer | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.
        try {
            apiInstance.getCatalogFeedByWeek(organization, weekModifier);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogFeedByWeek");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String organization = organization_example; // String | Organization name, lower case. E.g. "superbrugsen"
        Integer weekModifier = 56; // Integer | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.
        try {
            apiInstance.getCatalogFeedByWeek(organization, weekModifier);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogFeedByWeek");
            e.printStackTrace();
        }
    }
}
String *organization = organization_example; // Organization name, lower case. E.g. "superbrugsen"
Integer *weekModifier = 56; // Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

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

[apiInstance getCatalogFeedByWeekWith:organization
    weekModifier:weekModifier
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var organization = organization_example; // {{String}} Organization name, lower case. E.g. "superbrugsen"
var weekModifier = 56; // {{Integer}} Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

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

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

            var apiInstance = new DefaultApi();
            var organization = organization_example;  // String | Organization name, lower case. E.g. "superbrugsen"
            var weekModifier = 56;  // Integer | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

            try
            {
                apiInstance.getCatalogFeedByWeek(organization, weekModifier);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getCatalogFeedByWeek: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$organization = organization_example; // String | Organization name, lower case. E.g. "superbrugsen"
$weekModifier = 56; // Integer | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

try {
    $api_instance->getCatalogFeedByWeek($organization, $weekModifier);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getCatalogFeedByWeek: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $organization = organization_example; # String | Organization name, lower case. E.g. "superbrugsen"
my $weekModifier = 56; # Integer | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

eval { 
    $api_instance->getCatalogFeedByWeek(organization => $organization, weekModifier => $weekModifier);
};
if ($@) {
    warn "Exception when calling DefaultApi->getCatalogFeedByWeek: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
organization = organization_example # String | Organization name, lower case. E.g. "superbrugsen"
weekModifier = 56 # Integer | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

try: 
    api_instance.get_catalog_feed_by_week(organization, weekModifier)
except ApiException as e:
    print("Exception when calling DefaultApi->getCatalogFeedByWeek: %s\n" % e)

Parameters

Path parameters
Name Description
organization*
String
Organization name, lower case. E.g. "superbrugsen"
Required
week_modifier*
Integer
Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.
Required

Responses

Status: 200 - Data for the requested catalog.

Status: 400 - Bad request. Missing or invalid parameters provided.


getCatalogFeedList


/feed

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/feed"
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.getCatalogFeedList();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogFeedList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.getCatalogFeedList();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCatalogFeedList");
            e.printStackTrace();
        }
    }
}

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

[apiInstance getCatalogFeedListWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

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

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

            var apiInstance = new DefaultApi();

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

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

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

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

eval { 
    $api_instance->getCatalogFeedList();
};
if ($@) {
    warn "Exception when calling DefaultApi->getCatalogFeedList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

try: 
    api_instance.get_catalog_feed_list()
except ApiException as e:
    print("Exception when calling DefaultApi->getCatalogFeedList: %s\n" % e)

Parameters

Responses

Status: 200 - List of available catalogs.


getCoupOfTheMonthOffers


/offers/types/coupofthemonth/{month_modifier}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/offers/types/coupofthemonth/{month_modifier}?organization="
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String monthModifier = monthModifier_example; // String | Limit 0 | 1 for month modifier
        String organization = organization_example; // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
        try {
            apiInstance.getCoupOfTheMonthOffers(monthModifier, organization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCoupOfTheMonthOffers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String monthModifier = monthModifier_example; // String | Limit 0 | 1 for month modifier
        String organization = organization_example; // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
        try {
            apiInstance.getCoupOfTheMonthOffers(monthModifier, organization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCoupOfTheMonthOffers");
            e.printStackTrace();
        }
    }
}
String *monthModifier = monthModifier_example; // Limit 0 | 1 for month modifier
String *organization = organization_example; // Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly (optional)

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

[apiInstance getCoupOfTheMonthOffersWith:monthModifier
    organization:organization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var monthModifier = monthModifier_example; // {{String}} Limit 0 | 1 for month modifier
var opts = { 
  'organization': organization_example // {{String}} Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getCoupOfTheMonthOffers(monthModifier, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var monthModifier = monthModifier_example;  // String | Limit 0 | 1 for month modifier
            var organization = organization_example;  // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly (optional) 

            try
            {
                apiInstance.getCoupOfTheMonthOffers(monthModifier, organization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getCoupOfTheMonthOffers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$monthModifier = monthModifier_example; // String | Limit 0 | 1 for month modifier
$organization = organization_example; // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly

try {
    $api_instance->getCoupOfTheMonthOffers($monthModifier, $organization);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getCoupOfTheMonthOffers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $monthModifier = monthModifier_example; # String | Limit 0 | 1 for month modifier
my $organization = organization_example; # String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly

eval { 
    $api_instance->getCoupOfTheMonthOffers(monthModifier => $monthModifier, organization => $organization);
};
if ($@) {
    warn "Exception when calling DefaultApi->getCoupOfTheMonthOffers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
monthModifier = monthModifier_example # String | Limit 0 | 1 for month modifier
organization = organization_example # String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly (optional)

try: 
    api_instance.get_coup_of_the_month_offers(monthModifier, organization=organization)
except ApiException as e:
    print("Exception when calling DefaultApi->getCoupOfTheMonthOffers: %s\n" % e)

Parameters

Path parameters
Name Description
month_modifier*
String
Limit 0 | 1 for month modifier
Required
Query parameters
Name Description
organization
String
Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly

Responses

Status: 200 - A complete list of offers available.


getOffersTypes


/offers/types

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/offers/types"
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.getOffersTypes();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOffersTypes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.getOffersTypes();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOffersTypes");
            e.printStackTrace();
        }
    }
}

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

[apiInstance getOffersTypesWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

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

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

            var apiInstance = new DefaultApi();

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

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

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

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

eval { 
    $api_instance->getOffersTypes();
};
if ($@) {
    warn "Exception when calling DefaultApi->getOffersTypes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

try: 
    api_instance.get_offers_types()
except ApiException as e:
    print("Exception when calling DefaultApi->getOffersTypes: %s\n" % e)

Parameters

Responses

Status: 200 - List available Offer types


getProductByEAN


/products/ean/{ean}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/products/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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String ean = ean_example; // String | The ean of a product, for example "5701267600099"
        try {
            apiInstance.getProductByEAN(ean);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getProductByEAN");
            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 | The ean of a product, for example "5701267600099"
        try {
            apiInstance.getProductByEAN(ean);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getProductByEAN");
            e.printStackTrace();
        }
    }
}
String *ean = ean_example; // The ean of a product, for example "5701267600099"

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

[apiInstance getProductByEANWith:ean
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var ean = ean_example; // {{String}} The ean of a product, for example "5701267600099"

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

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

            var apiInstance = new DefaultApi();
            var ean = ean_example;  // String | The ean of a product, for example "5701267600099"

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

$api_instance = new Swagger\Client\ApiDefaultApi();
$ean = ean_example; // String | The ean of a product, for example "5701267600099"

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $ean = ean_example; # String | The ean of a product, for example "5701267600099"

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
ean = ean_example # String | The ean of a product, for example "5701267600099"

try: 
    api_instance.get_product_by_ean(ean)
except ApiException as e:
    print("Exception when calling DefaultApi->getProductByEAN: %s\n" % e)

Parameters

Path parameters
Name Description
ean*
String
The ean of a product, for example "5701267600099"
Required

Responses

Status: 200 - A single product that matches that ean together with an Id, motivid (For which you can use the image service to fetch the image) and product name.


getRankedOffers

Provides a list of offerIds split by organization and segment. The offers are ordered by their offerscore with the highest score for the segment first. Displays offers for the current active week. Organizations contains segments which contains offers. Each offer will display an Id and the score of the segment. For example if you would call [ https://apiservice2.republica.dk/v2/offers/ranked?organization=kvickly&segment=milj](https://apiservice2.republica.dk/v2/offers/ranked?organization=kvickly&segment=milj). You will get all miljø offers for kvickly ordered by their offerscore. The Id here refers to the offerId which you can find in the /feed endpoint. It is possible to specificy multiple organizations and segments. If you wish to find all miljø and kvaliteit offers for kvickly the call would look like this [https://apiservice2.republica.dk/v2/offers/ranked?organization=kvickly&segment=milj&segment=kval]( https://apiservice2.republica.dk/v2/offers/ranked?organization=kvickly&segment=milj&segment=kval.) An offer having multiple segments will appear in each segment it belongs to. Multiple organizations can be adding in the same way a new segment is added. Keep in mind the scores themselves can have negative numbers.


/offers/ranked

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/offers/ranked?organization=&segment="
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String organization = organization_example; // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
        String segment = segment_example; // String | Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval
        try {
            apiInstance.getRankedOffers(organization, segment);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getRankedOffers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String organization = organization_example; // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
        String segment = segment_example; // String | Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval
        try {
            apiInstance.getRankedOffers(organization, segment);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getRankedOffers");
            e.printStackTrace();
        }
    }
}
String *organization = organization_example; // Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
String *segment = segment_example; // Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval

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

[apiInstance getRankedOffersWith:organization
    segment:segment
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var organization = organization_example; // {{String}} Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
var segment = segment_example; // {{String}} Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval

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

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

            var apiInstance = new DefaultApi();
            var organization = organization_example;  // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
            var segment = segment_example;  // String | Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval

            try
            {
                apiInstance.getRankedOffers(organization, segment);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getRankedOffers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$organization = organization_example; // String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
$segment = segment_example; // String | Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval

try {
    $api_instance->getRankedOffers($organization, $segment);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getRankedOffers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $organization = organization_example; # String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
my $segment = segment_example; # String | Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval

eval { 
    $api_instance->getRankedOffers(organization => $organization, segment => $segment);
};
if ($@) {
    warn "Exception when calling DefaultApi->getRankedOffers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
organization = organization_example # String | Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
segment = segment_example # String | Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval

try: 
    api_instance.get_ranked_offers(organization, segment)
except ApiException as e:
    print("Exception when calling DefaultApi->getRankedOffers: %s\n" % e)

Parameters

Query parameters
Name Description
organization*
String
Organization by which to filter the offers. To filter by multiple organizations, duplicate the organization param. f.e. organization=fakta&organization=kvickly
Required
segment*
String
Segment to filter the offers. Current segments are [milj,barn,kval,rest]. To filter by multiple segments, duplicate the segment param. f.e. segment=milj&segment=kval
Required

Responses

Status: 200 - List of offers for one or multiple segments for one or multiple organizations. Sorted by the Offer score descending.


getStaerkPrisOffers

Provides a list of staerk pris offers that are valid for a specific organization. The endpoint works by filtering out the non relevant offers from the feed/week endpoints.


/offers/types/staerkpris/{organization}/{week_modifier}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://apiservice2.republica.dk/v2/offers/types/staerkpris/{organization}/{week_modifier}"
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) {
        
        DefaultApi apiInstance = new DefaultApi();
        String organization = organization_example; // String | Organization name, lower case. E.g. "superbrugsen"
        String weekModifier = weekModifier_example; // String | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.
        try {
            apiInstance.getStaerkPrisOffers(organization, weekModifier);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getStaerkPrisOffers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String organization = organization_example; // String | Organization name, lower case. E.g. "superbrugsen"
        String weekModifier = weekModifier_example; // String | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.
        try {
            apiInstance.getStaerkPrisOffers(organization, weekModifier);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getStaerkPrisOffers");
            e.printStackTrace();
        }
    }
}
String *organization = organization_example; // Organization name, lower case. E.g. "superbrugsen"
String *weekModifier = weekModifier_example; // Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

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

[apiInstance getStaerkPrisOffersWith:organization
    weekModifier:weekModifier
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RepublicaApi = require('republica_api');

var api = new RepublicaApi.DefaultApi()
var organization = organization_example; // {{String}} Organization name, lower case. E.g. "superbrugsen"
var weekModifier = weekModifier_example; // {{String}} Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

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

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

            var apiInstance = new DefaultApi();
            var organization = organization_example;  // String | Organization name, lower case. E.g. "superbrugsen"
            var weekModifier = weekModifier_example;  // String | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

            try
            {
                apiInstance.getStaerkPrisOffers(organization, weekModifier);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getStaerkPrisOffers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$organization = organization_example; // String | Organization name, lower case. E.g. "superbrugsen"
$weekModifier = weekModifier_example; // String | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

try {
    $api_instance->getStaerkPrisOffers($organization, $weekModifier);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getStaerkPrisOffers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $organization = organization_example; # String | Organization name, lower case. E.g. "superbrugsen"
my $weekModifier = weekModifier_example; # String | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

eval { 
    $api_instance->getStaerkPrisOffers(organization => $organization, weekModifier => $weekModifier);
};
if ($@) {
    warn "Exception when calling DefaultApi->getStaerkPrisOffers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
organization = organization_example # String | Organization name, lower case. E.g. "superbrugsen"
weekModifier = weekModifier_example # String | Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.

try: 
    api_instance.get_staerk_pris_offers(organization, weekModifier)
except ApiException as e:
    print("Exception when calling DefaultApi->getStaerkPrisOffers: %s\n" % e)

Parameters

Path parameters
Name Description
organization*
String
Organization name, lower case. E.g. "superbrugsen"
Required
week_modifier*
String
Number of weeks ahead to get. 0 = current week, 1 = next week, etc. Limited to 0-3.
Required

Responses

Status: 200 - A complete list of offers available.