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 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",
      "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",
      "title": "{\"en\":\"Vcard\"}"
    }
  ],
  "limit": 100,
  "offset": 0
}

results matching ""

    No results matching ""