Skip to content

Latest commit

 

History

History
288 lines (199 loc) · 8.23 KB

File metadata and controls

288 lines (199 loc) · 8.23 KB

Id4iApi.AliasApi

All URIs are relative to https://backend.id4i.de

Method HTTP request Description
addGuidAlias POST /api/v1/id4ns/{id4n}/alias/{aliasType} Add alias for GUID or Collection
getGuidAliasTypes GET /api/v1/search/guids/aliases/types List all supported alias types
getGuidAliases GET /api/v1/id4ns/{id4n}/alias Get all aliases for the given GUID or Collection.
removeGuidAlias DELETE /api/v1/id4ns/{id4n}/alias/{aliasType} Remove aliases from GUID or Collection
searchByAlias GET /api/v1/search/guids Search for GUIDs by alias

addGuidAlias

addGuidAlias(id4n, aliasType, alias)

Add alias for GUID or Collection

Adds or replaces aliases for single ID4ns (alias type item and mapp) or groups of ID4ns (alias types gtin, ean and article)

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

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

var apiInstance = new Id4iApi.AliasApi();

var id4n = "id4n_example"; // String | The GUID or Collection to operate on

var aliasType = "aliasType_example"; // String | Alias type, see the corresponding API model

var alias = new Id4iApi.GuidAlias(); // GuidAlias | The alias to add or update


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.addGuidAlias(id4n, aliasType, alias, callback);

Parameters

Name Type Description Notes
id4n String The GUID or Collection to operate on
aliasType String Alias type, see the corresponding API model
alias GuidAlias The alias to add or update

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

getGuidAliasTypes

['String'] getGuidAliasTypes()

List all supported alias types

Retrieve this list to find out all alias types to use with alias search and change operations

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

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

var apiInstance = new Id4iApi.AliasApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getGuidAliasTypes(callback);

Parameters

This endpoint does not need any parameter.

Return type

['String']

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

getGuidAliases

{'String': 'String'} getGuidAliases(id4n)

Get all aliases for the given GUID or Collection.

Looks up the alias for each alias type (group and single) and returns a map of all aliases found.

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

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

var apiInstance = new Id4iApi.AliasApi();

var id4n = "id4n_example"; // String | The GUID or Collection to operate on


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getGuidAliases(id4n, callback);

Parameters

Name Type Description Notes
id4n String The GUID or Collection to operate on

Return type

{'String': 'String'}

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

removeGuidAlias

removeGuidAlias(id4n, aliasType)

Remove aliases from GUID or Collection

Remove the alias of the given type

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

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

var apiInstance = new Id4iApi.AliasApi();

var id4n = "id4n_example"; // String | The GUID or Collection to operate on

var aliasType = "aliasType_example"; // String | Alias type, see the corresponding API model


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.removeGuidAlias(id4n, aliasType, callback);

Parameters

Name Type Description Notes
id4n String The GUID or Collection to operate on
aliasType String Alias type, see the corresponding API model

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

searchByAlias

PaginatedResponseOfGuid searchByAlias(alias, aliasType, opts)

Search for GUIDs by alias

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

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

var apiInstance = new Id4iApi.AliasApi();

var alias = "alias_example"; // String | The alias to search for

var aliasType = "aliasType_example"; // String | Alias type type to search for

var opts = { 
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.searchByAlias(alias, aliasType, opts, callback);

Parameters

Name Type Description Notes
alias String The alias to search for
aliasType String Alias type type to search for
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfGuid

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json