Serialization

The “serialization-service” provides methods for creating SGTIN and LGTIN

Requirements

  1. User's session must contain field “current_participant”.
{
  "id": "urn:authenticateit:user:email:my@gmail.com",
  "name": "ivan",
  "roles": [
    "user"
  ],
  "ticket": "7b758d11-a597-44ae-8ab4-dd3cf864e20f",
  "current_participant": {
    "id": "urn:epc:sgln:0614141.12345.1"
  }
}
  1. This participant must be presented in doc_storage with “type” field equals to “outsource” or “manufacturer”. Document also must provide a list of company prefixes
{
  "_id": "urn:epc:sgln:0614141.12345.1",
  "type": "participant",
  "participant_type": [
    "manufacturer"
  ],
  "company_prefix": [
    "0614141"
  ]
}

Create SGTINs or LGTINs with requested paremeters

POST /serialization-service/serialize
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
gtin base gtin “00614141791304”
format serialization format “gs1” or “epc”
type serialization type “sgtin” or “lgtin”
count requested number integer
sequence sequence option “ordered” or “random”
owner owner of serialized gtin not required
settings export settings not required, if not presented - use default
labels_as_titles labels as titles in csv header “yes” or “no”, default “no”
code gs1 code in csv “yes” or “no”, default “yes”
owner owner id in csv “yes” or “no”, default “no”
delimiter delimiter in csv default "|"
name export product name in csv “yes” or “no”, default “no”
ai AI in created SGTIN or LGTIN not required, default “01”
source Additional source in SGTIN or LGTIN doc not required

Get status of serialization

GET /serialization-service/serialize
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
  "progress": 100,
  "status": "started"
}
{
  "status": "done",
  "link": "https://dev-test-cdn.shping.com/2016-12-04T19:44:49Z-b3c59bfa-4f8e-431e-b445-de2417cdffa8.csv"
}
{
  "error": "Serialization not has been started"
}

Get “task_serialization” document

GET /serialization-service/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
  "id": "task_serialization",
  "serialization_list": [
    {
      "ai": "02",
      "check_digit": "4",
      "company_prefix": "0614141",
      "count": 10,
      "end_time": "2016-12-03T13:00:43Z",
      "epc_header": "urn:epc:id:lgtin:0614141.079130.",
      "gs1_header": "020061414179130410",
      "gtin": "00614141791304",
      "indicator": "0",
      "item_reference": "79130",
      "link": "https://dev-test-cdn.shping.com/2016-12-03T13:00:40Z-6d20f9c0-811b-4829-b899-9512ef4ad356.csv",
      "owner": "urn:epc:sgln:0614141.12345.1",
      "participant": "urn:epc:sgln:0614141.123451",
      "sequence": "random",
      "settings": {
        "code": "no",
        "delimiter": "|",
        "labels_as_titles": "yes",
        "name": "yes",
        "owner": "yes"
      },
      "start_time": "2016-12-03T13:00:40Z",
      "type": "lgtin",
      "user": "urn:epc:sgln:0614141.12345.1"
    },
    {
      "ai": "02",
      "check_digit": "4",
      "company_prefix": "0614141",
      "count": 10,
      "end_time": "2016-12-03T10:18:50Z",
      "epc_header": "urn:epc:id:lgtin:0614141.079130.",
      "gs1_header": "020061414179130410",
      "gtin": "00614141791304",
      "indicator": "0",
      "item_reference": "79130",
      "last_element": "urn:epc:id:lgtin:0614141.079130.0000010030",
      "link": "https://dev-test-cdn.shping.com/2016-12-03T10:18:25Z-6efdca22-e049-4f6d-9faa-ac4b7c739e1f.csv",
      "owner": "urn:epc:sgln:0614141.12345.1",
      "participant": "urn:epc:sgln:0614141.12345.1",
      "sequence": "ordered",
      "settings": {
        "code": "no",
        "delimiter": "|",
        "labels_as_titles": "yes",
        "name": "yes",
        "owner": "yes"
      },
      "start_time": "2016-12-03T10:18:25Z",
      "type": "lgtin",
      "user": "urn:epc:sgln:0614141.12345.1"
    }
  ]
}

results matching ""

    No results matching ""