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"
  ]
}

results matching ""

    No results matching ""