GDTI
All GDTI endpoints have path prefix /gdti-service.
To access GDTI APIs user must have product_line
role.
Create Document
Create document for GDTI. Takes JSON object containing GDTI
representation. The GDTI will be constructed from company_prefix
,
doc_type
and serial_number
, or it may be specified directly as
id
. Either doc_type
or id
is required to create a
document. First participant company prefix will be used if
company_prefix
is unspecified. If there is no serial_number
provided, it will be generated randomly.
Representation may also contain title
(either English text, or
object mapping language codes to text) and the list of sources
.
GDTI may have links to other GDTI documents specified in attachments
parameter. It must be list of document identifiers.
Responds with created document representation.
Participant's company prefix must be compatible with the prefix in GDTI.
POST /gdti-service/gdtis
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"company_prefix": "7312345",
"doc_type": "3",
"serial_number": "001",
"title": {
"en": "Test",
"ru": "Тест"
},
"sources": [
{
"conditions": {
"language": [
"en",
"ru"
]
},
"data": [
{
"text": {
"title": "Main prod",
"text": "Some text"
}
}
]
}
],
"attachments": [
"urn:epc:id:gdti:7312345.00003.111"
]
}
Example Response
{
"company_prefix": "7312345",
"doc_type": "3",
"id": "urn:epc:id:gdti:7312345.00003.001",
"owner": "urn:authenticateit:participant:331756080046055",
"serial_number": "001",
"sources": [
{
"conditions": {
"language": [
"en",
"ru"
]
},
"data": [
{
"text": {
"text": "Some text",
"title": "Main prod"
}
}
]
}
],
"attachments": [
"urn:epc:id:gdti:7312345.00003.111"
],
"title": {
"en": "Test",
"ru": "Тест"
}
}
Update Document
Endpoint for to update an existing document for GDTI. Takes JSON
object containing with new values. title
, sources
and
attachments
may be updated. Responds with updated document
representation.
PUT /gdti-service/gdtis/:id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
string | GDTI |
Example Request
{
"title": "Only English Title"
}
Example Response
{
"company_prefix": "7312345",
"doc_type": "3",
"id": "urn:epc:id:gdti:7312345.00003.001",
"owner": "urn:authenticateit:participant:331756080046055",
"serial_number": "001",
"sources": [
{
"conditions": {
"language": [
"en",
"ru"
]
},
"data": [
{
"text": {
"text": "Some text",
"title": "Main prod"
}
}
]
}
],
"attachments": [
"urn:epc:id:gdti:7312345.00003.111"
],
"title": "Only English Title"
}
Delete Document
Endpoint to delete existing document by GDTI.
DELETE /gdti-service/gdtis/:id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
string | GDTI |
List attached GTINs and GDTIs
List GDTIs and GTINs having specified GDTI as attachment. Resulting
JSON object will include list of gdti
identifiers (if missing,
equivalent to empty list) and list of gtin
identifiers (equivalent
to empty list, if missing).
GET /gdti-service/gdtis/:gdti/attached
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
gdti |
string | Look for GTINs/GDTIs with this GDTI attached |
Example Response
{
"gdti": [
"urn:epc:id:gdti:49.0000000003.001",
"urn:epc:id:gdti:49.0000000003.003"
],
"gtin": [
"19212345000159"
]
}
List positions of the GDTI
List positions of the specified GDTI in attachments of GDTIs and
GTINs. Resulting JSON object will include gdti
object (if missing,
equivalent to empty object) and gtin
object (equivalent to empty
object, if missing). The gdti
and gtin
objects include mappings
from GTINs/GDTIs to non-negative integer positions of the specified
GDTI in attachments.
GET /gdti-service/gdtis/:gdti/attached/positions
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
gdti |
string | Look for GTINs/GDTIs with this GDTI attached |
Example Response
{
"gdti": {
"urn:epc:id:gdti:49.0000000003.003": 1
},
"gtin": {
"19212345000159": 0
}
}
List GDTIs
List existing GDTIs. GDTI may be filtered by company_prefix
,
doc_type
, serial_number
, owner
and title
. Number of GDTIs may
be skipped from the resulting list with offset
parameter (0
by
default). Number of returned GDTIs may be limited with limit
parameter (100
by default).
GET /gdti-service/gdtis
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
company_prefix |
string | Return only GDTIs with this company prefix. |
doc_type |
string | Return only GDTIs with this document type. |
serial_number |
string | Return only GDTIs with this serial number. |
owner |
string | Return only GDTIs where owner is specified participant. |
title |
string | Return only GDTIs where title matches specified string. |
offset |
number | Skip number of GDTIs from resulting list. |
limit |
number | Limit the number of returned GDTIs. |
Example Response
{
"count": 2,
"data": [
{
"company_prefix": "9212345",
"doc_type": "1",
"id": "urn:epc:id:gdti:9212345.00001.008113943527211",
"owner": "urn:authenticateit:participant:576318441844504",
"serial_number": "008113943527211",
"image": null,
"title": "{\"en\":\"Main VCard\",\"ru\":\"Визитная карточка\",\"zh\":\"訪問卡\"}"
},
{
"company_prefix": "9212345",
"doc_type": "1",
"id": "urn:epc:id:gdti:9212345.00001.094403711644618",
"owner": "urn:authenticateit:participant:576318441844504",
"serial_number": "094403711644618",
"image": "https://www.foo.br/xyz.jpg",
"title": "{\"en\":\"Vcard\"}"
}
],
"limit": 100,
"offset": 0
}
Global GDTI Attachments
Set Global Attachments
Set global GDTI attachments for all products of current
participant. Request body must include possibly empty list of
attachments
. There is no response body.
Global attachment positions may be overriden with
attachment_positions
in the request body. See product
attachments API description for more
information on attachment positions.
PUT /gdti-service/attachments/global
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"attachments": [
"urn:epc:id:gdti:0000.00000005.004803474973806",
"urn:epc:id:gdti:0000.00000005.004819191780015"
],
"attachment_positions": {
"urn:epc:id:gdti:0000.00000005.004803474973806": 3
}
}
Add Global Attachments
Add GDTIs to the list of global attachments for participant. Request
body must have non-empty list of attachments
. There is no response
body.
Attachment positions may be added with attachment_positions
in the
request body.
POST /gdti-service/attachments/global/add
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"attachments": [
"urn:epc:id:gdti:0000.00000005.004844819068240"
],
"attachment_positions": {
"urn:epc:id:gdti:0000.00000005.004819191780015": 1,
"urn:epc:id:gdti:0000.00000005.004803474973806": 2
}
}
Remove Global Attachments
Remove specified GDTIs from the list of global attachments for current
participant. Request body must contain non-empty list of attachments
to be removed. There is no response body.
Attachment positions for the removed attachment GDTIs will also be removed.
Positions for selected global attachments may be removed by providing
attachment_positions
in the request body. See product
attachments API description for more
information.
POST /gdti-service/attachments/global/remove
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"attachments": [
"urn:epc:id:gdti:0000.00000005.004803474973806"
]
}
Read Global Attachments
Query global GDTI attachments for all products of the
participant. Response has attachments
list of GDTIs and
attachment_positions
object.
GET /gdti-service/attachments/global
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Response
{
"attachments": [
"urn:epc:id:gdti:0000.00000005.004819191780015",
"urn:epc:id:gdti:0000.00000005.004844819068240"
],
"attachment_positions": {
"urn:epc:id:gdti:0000.00000005.004819191780015": 1
}
}