Skip to content

Latest commit

 

History

History
756 lines (525 loc) · 21.7 KB

File metadata and controls

756 lines (525 loc) · 21.7 KB

Id4iApi.GuidsApi

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
createGuid POST /api/v1/guids Create GUID(s)
deleteProperties DELETE /api/v1/id4ns/{id4n}/properties Delete ID4n properties
getCollections GET /api/v1/id4ns/{id4n}/collections Retrieve collections of an ID
getGuid GET /api/v1/guids/{id4n} Retrieve GUID information
getGuidAliases GET /api/v1/id4ns/{id4n}/alias Get all aliases for the given GUID or Collection.
getGuidsWithoutCollection GET /api/v1/guids/withoutCollection Retrieve GUIDs not in any collection
getId4n GET /api/v1/id4ns/{id4n} Retrieve ID4n information
getProperties GET /api/v1/id4ns/{id4n}/properties Retrieve ID4n properties
importGS1Codes POST /api/v1/import/gs1 Import GS1/MAPP codes
patchProperties PATCH /api/v1/id4ns/{id4n}/properties Patch ID4n properties
removeGuidAlias DELETE /api/v1/id4ns/{id4n}/alias/{aliasType} Remove aliases from GUID or Collection
updateGuid PATCH /api/v1/guids/{id4n} Change GUID information.

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.GuidsApi();

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

createGuid

ListOfId4ns createGuid(createGUIDInfo)

Create GUID(s)

Creating one or more GUIDs with a specified length.

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.GuidsApi();

var createGUIDInfo = new Id4iApi.CreateGuidRequest(); // CreateGuidRequest | GUID creation model


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

Parameters

Name Type Description Notes
createGUIDInfo CreateGuidRequest GUID creation model

Return type

ListOfId4ns

Authorization

Authorization

HTTP request headers

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

deleteProperties

deleteProperties(id4n, organizationId, properties)

Delete ID4n properties

Partial deletion of id4n properties. If the property does not exist, it will be ignored.

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.GuidsApi();

var id4n = "id4n_example"; // String | The id4n

var organizationId = "organizationId_example"; // String | The organization namespace to work on while deleting the properties.

var properties = [new Id4iApi.[String]()]; // [String] | A set of property keys to delete.


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

Parameters

Name Type Description Notes
id4n String The id4n
organizationId String The organization namespace to work on while deleting the properties.
properties [String] A set of property keys to delete.

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

getCollections

PaginatedResponseOfGuidCollection getCollections(id4n, opts)

Retrieve collections of an ID

Retrieving all owned or holding collections the specified id4n is assigned to.

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.GuidsApi();

var id4n = "id4n_example"; // String | The ID which the collections should contain

var opts = { 
  'organizationId': "organizationId_example", // String | The organization holding the collections.
  '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.getCollections(id4n, opts, callback);

Parameters

Name Type Description Notes
id4n String The ID which the collections should contain
organizationId String The organization holding the collections. [optional]
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfGuidCollection

Authorization

Authorization

HTTP request headers

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

getGuid

Guid getGuid(id4n, opts)

Retrieve GUID information

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.GuidsApi();

var id4n = "id4n_example"; // String | The GUID number

var opts = { 
  'organizationId': "organizationId_example" // String | The organization namespace to resolve.
};

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

Parameters

Name Type Description Notes
id4n String The GUID number
organizationId String The organization namespace to resolve. [optional]

Return type

Guid

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.GuidsApi();

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

getGuidsWithoutCollection

PaginatedResponseOfGuid getGuidsWithoutCollection(organizationId, opts)

Retrieve GUIDs not in any collection

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.GuidsApi();

var organizationId = "organizationId_example"; // String | The namespace of the organization to search GUIDs 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.getGuidsWithoutCollection(organizationId, opts, callback);

Parameters

Name Type Description Notes
organizationId String The namespace of the organization to search GUIDs 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

getId4n

Id4nPresentation getId4n(id4n, opts)

Retrieve ID4n information

Retrieving basic information about an ID like the type and the creation time.

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.GuidsApi();

var id4n = "id4n_example"; // String | The ID to resolve to

var opts = { 
  'organizationId': "organizationId_example" // String | The organization namespace to resolve.
};

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

Parameters

Name Type Description Notes
id4n String The ID to resolve to
organizationId String The organization namespace to resolve. [optional]

Return type

Id4nPresentation

Authorization

Authorization

HTTP request headers

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

getProperties

{'String': 'String'} getProperties(id4n, opts)

Retrieve ID4n properties

List all properties of an id4n.

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.GuidsApi();

var id4n = "id4n_example"; // String | The id4n

var opts = { 
  'organizationId': "organizationId_example" // String | The organization namespace.
};

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

Parameters

Name Type Description Notes
id4n String The id4n
organizationId String The organization namespace. [optional]

Return type

{'String': 'String'}

Authorization

Authorization

HTTP request headers

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

importGS1Codes

importGS1Codes(importGS1CodesRequest)

Import GS1/MAPP codes

Importing GS1/MAPP codes that contain unique components.

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.GuidsApi();

var importGS1CodesRequest = new Id4iApi.ImportGS1CodesRequest(); // ImportGS1CodesRequest | The information how the MAPP codes should be imported and the list of MAPP codes


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

Parameters

Name Type Description Notes
importGS1CodesRequest ImportGS1CodesRequest The information how the MAPP codes should be imported and the list of MAPP codes

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

patchProperties

patchProperties(id4n, organizationId, properties)

Patch ID4n properties

Partial updating of id4n properties. If a property contains a null value the property will be deleted other values will be saved and overwritten if they already exist.

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.GuidsApi();

var id4n = "id4n_example"; // String | The id4n

var organizationId = "organizationId_example"; // String | The organization namespace to work on while patching the properties.

var properties = null; // Object | The properties to update.


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

Parameters

Name Type Description Notes
id4n String The id4n
organizationId String The organization namespace to work on while patching the properties.
properties Object The properties to update.

Return type

null (empty response body)

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.GuidsApi();

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

updateGuid

Object updateGuid(id4n, request)

Change GUID information.

Allows ownership transfer.

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.GuidsApi();

var id4n = "id4n_example"; // String | The GUID number

var request = new Id4iApi.Guid(); // Guid | request


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

Parameters

Name Type Description Notes
id4n String The GUID number
request Guid request

Return type

Object

Authorization

Authorization

HTTP request headers

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