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.

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"
          }
        }
      ]
    }
  ]
}
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"
          }
        }
      ]
    }
  ],
  "title": {
    "en": "Test",
    "ru": "Тест"
  }
}

Update Document

Endpoint for to update an existing document for GDTI. Takes JSON object containing with new values. title and sources 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"
          }
        }
      ]
    }
  ],
  "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

results matching ""

    No results matching ""