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

Start serialization process with the given parameters. Responds with JSON object containing serialization task id. The returned identifier may be used to request task status.

GS1 application identifiers (see here for additional information) may be included in the generated SGTINs or LGTINs. The following AIs are supported:

  • Date AIs 1117. Data for these AIs is a 6 digits string representing date in YYMMDD format. E.g., June 11, 2019 will be represented as 190611.
  • Measurement AIs 310369. Data for these AIs is a 6 digits string representing the measurement. The first digit in the data indicates the number of decimal places. The rest of the digits represent the measured value. E.g., net weight of 1.23 kg will be represented as AI 310 with data 200123.
  • Additional product identification AI 240. Data for this AI is a string up to 30 characters long. The following characters and character ranges are allowed in the data: !", %/, 09, AZ, _ and az.
  • Company internal information AIs 9199. Data for these AIs is a string up to 90 characters long. The same characters are allowed in the data as in AI 240 (see above).
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
data_type "numeric", "alphanumeric" or "all"
length integer from 1 to 20
sequence sequence option “ordered” or “random”
owner owner of serialized gtin not required
settings export settings not required, if not presented - use default
settings.labels_as_titles labels as titles in csv header “yes” or “no”, default “no”
settings.code gs1 code in csv “yes” or “no”, default “yes”
settings.owner owner id in csv “yes” or “no”, default “no”
settings.delimiter delimiter in csv default "|"
settings.name export product name in csv “yes” or “no”, default “no”
ai GS1 AI to be included in SGTIN or LGTIN List of application identifiers.
participant Participant identifier Assing child supply chain participant as SGTIN owner
location Business location identifier Assing business location owner as SGTIN owner
source Additional source in SGTIN or LGTIN doc single source object
sources Additional sources in SGTIN or LGTIN doc list of source objects
Example Request
{
  "gtin": "02933451000009",
  "name": "Butter",
  "type": "lgtin",
  "format": "epc",
  "count": 2,
  "ai": [
    "12180608"
  ],
  "sequence": "random",
  "length": 12,
  "data_type": "alphanumeric",
  "source": {
    "data": [
      {
        "text": {
          "title": "44",
          "text": "444444"
        }
      },
      {
        "text": {
          "title": "55",
          "text": "555555"
        }
      }
    ],
    "conditions": {
      "country": "036",
      "language": "zh"
    }
  }
}
{
  "gtin": "02933451000009",
  "name": "Shoes",
  "type": "sgtin",
  "format": "gs1",
  "count": 3,
  "ai": [
    "13180609",
    "15180602",
    "16180609",
    "3110000033",
    "17180602"
  ],
  "sequence": "random",
  "length": 12,
  "data_type": "numeric",
  "sources": [
    {
      "conditions": {},
      "data": [
        {
          "text": {
            "title": "text",
            "text": "Update SGTIN widget",
            "markdown": false
          }
        },
        {
          "link": {
            "text": "Link",
            "url": "http://www.facebook.com/shping"
          }
        }
      ]
    }
  ]
}
Example Response
{
  "id": "ff79bfae-3713-49ec-8551-2f29bb4d3b72"
}

Get status of serialization

Get status of previously started serialization task.

GET /serialization-service/serialize/:task_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
task_id string Serialization task identifier.
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 serialization tasks

Returns list of previously started serialization tasks.

Number of returned tasks may be limited with the limit parameter (default valus is 100). Number of tasks may be skipped from the list with the offset parameter (0 by default).

Returned tasks may be filtered by status (either started or done), gtin, name (tasks for GTINs with product name matching this string).

The resulting list may be sorted. Parameter sort_by should be used to specify sorting field (start_time, gtin, name or status). Sorting order may be specified with sort_order parameter (asc for ascending order and desc for descending order).

GET /serialization-service/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
offset Skip number of tasks from the resulting list.
limit Limite the number of tasks in the resulting list.
from_date Only tasks started after this date.
to_date Only tasks started before this date.
status Only tasks with this status.
gtin Only tasks for the GTIN.
name Only tasks for products matching this name.
sort_by Sort tasks by field.
sort_order Ascending or descending sort order.
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"
    }
  ]
}

Shipping Containers

All endpoints require serialization_admin role for the calling user.

Import SSCCs

Create SSCC documents in the system from provided SSCC codes. Accepts JSON object representation of the import task parameters, starts the task and responds with id of the task. Import description has the following fields:

  • id — a single SSCC or a list of SSCC codes to be imported. SSCCs as GS1 codes and SSCCs in EPC format are accepted.
  • company_prefix — import only SSCCs which have company prefix compatible with the specified prefix. The prefix must be in participant's list of prefixes or participant should have a wildcard (*) prefix *.

Only SSCCs which are not already present will be created. Company prefix of SSCCs should correspond to current participant's company prefixes.

POST /serialization-service/packaging/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
Example Request
{
  "id": [
    "urn:epc:id:sscc:9212345.0000000001",
    "urn:epc:id:sscc:1111111.1111111111",
    "00193423360000001230",
    "00111111111111111118"
  ]
}
Example Response
{
  "id": "d78c69d3-5a64-4fed-bf93-5621be12aece"
}

Generate SSCCs

Generate list of random or serial SSCCs for current participant. Accepts JSON object representation of the generation task parameters, starts the task and responds with id of the task. Generate task description has the following fields:

  • count — positive number of SSCCs to be generated. This parameter is required and has no default value.
  • sequence — either ordered or random. The default value is random.
  • company_prefix — use this company prefix in generated SSCCs. The prefix must be accessible by current participant, or current participant should have a wildcard prefix *. The parameter is optional, first valid company prefix of participant will be used, if unspecified.
  • serial_number — start ordered SSCCs from this serial number. Only applicable for the ordered sequence. Has no default value, must be specified explicitly if sequence is ordered.

In ordered mode, if generated SSCC is already present, next serial number will be tried.

POST /serialization-service/packaging/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
Example Request
{
  "count": 3,
  "sequence": "ordered",
  "company_prefix": "9212345",
  "serial_number": 1
}
Example Response
{
  "id": "344d2f8f-8aeb-4ae2-9cc7-954cbe3231d6"
}

Status of a SSCC Generation Task

Query status of SSCC import/generation task.

Task status representation has the total count of SSCCs to be created, number of already processed SSCCs in the progress field, list of already created SSCCs in the created field and the list of errors.

GET /serialization-service/packaging/tasks/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
Example Response
{
  "count": 4,
  "created": [
     {
       "gs1_sscc": "00099111116915813129",
       "id": "urn:epc:id:sscc:9911111.0691581312"
     }
  ],
  "end_time": "2019-06-11T21:23:03Z",
  "errors": [
    {
      "error_id": "serialization-bad_sscc_prefix",
      "sscc": "00111111111111111118"
    },
    {
      "error_id": "serialization-bad_sscc_prefix",
      "sscc": "urn:epc:id:sscc:1111111.1111111111"
    },
    {
      "error_id": "serialization-sscc_exists",
      "sscc": "urn:epc:id:sscc:9212345.0000000001"
    }
  ],
  "id": "d78c69d3-5a64-4fed-bf93-5621be12aece",
  "progress": 4,
  "start_time": "2019-06-11T21:23:03Z",
  "status": "done"
}

Status of All SSCC Generation Tasks

Get status of all SSCC create/import tasks for the participant. Response has list of tasks. Each entry represents a single task (see Status of a Task endpoint for task representation).

GET /serialization-service/packaging/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
Example Response
{
  "tasks": [
    {
      "count": 4,
      "created": [
        {
          "gs1_sscc": "00099111116915813129",
          "id": "urn:epc:id:sscc:9911111.0691581312"
        }
      ],
      "end_time": "2019-06-11T21:23:03Z",
      "errors": [
        {
          "error_id": "serialization-bad_sscc_prefix",
          "sscc": "00111111111111111118"
        },
        {
          "error_id": "serialization-bad_sscc_prefix",
          "sscc": "urn:epc:id:sscc:1111111.1111111111"
        },
        {
          "error_id": "serialization-sscc_exists",
          "sscc": "urn:epc:id:sscc:9212345.0000000001"
        }
      ],
      "id": "d78c69d3-5a64-4fed-bf93-5621be12aece",
      "progress": 4,
      "start_time": "2019-06-11T21:23:03Z",
      "status": "done"
    }
  ]
}

Pack Items into a Container

Endpoint to package existing SGTIN, LGTIN or children SSCC items into a container.

Item identifiers must be provided in items field in request body. Container is identified by SSCC in request URL.

Responds with list of sucessfully packed items and with the list of errors.

POST /serialization-service/packaging/container/:sscc/pack
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
sscc string Container identifier to pack into
Example Request
{
  "items": [
    "urn:epc:id:sscc:9212345.0000000001",
    "urn:epc:id:sscc:1111111.1111111111",
    "urn:epc:id:sgtin:652086.0004527.000000000000001"
  ]
}
Example Response
{
  "packed": [
    "urn:epc:id:sscc:9212345.0000000001",
    "urn:epc:id:sgtin:652086.0004527.000000000000001"
  ],
  "errors": [
    {
      "item": "urn:epc:id:sscc:1111111.1111111111",
      "error_id": "serialization-bad_pack_item"
    }
  ]
}

Unpack Container

Endpoint to explicitly mark a container as unpacked. Responds with no content.

POST /serialization-service/packaging/container/:sscc/pack
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
sscc string Container to unpack
Example Request
{
}

Query Participant Packaging Settings

Endpoint for system participant to query packaging settings of a serialization admin participant.

Packaging settings consists of container_company_prefix list (participant is allowed to pack items into containers with these prefixes) and item_company_prefix list (participant is allowed to pack items with these prefixes).

GET /serialization-service/packaging/participant/:participant_id/settings
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
participant_id string Participant identifier
Example Response
{
  "container_company_prefix": [
    "9212345",
    "9523452"
  ],
  "item_company_prefix": [
    "9212345"
  ]
}

Update Participant Packaging Settings

Endpoint for system participant to update packaging settings of a serialization admin participant. container_company_prefix and item_company_prefix lists may be updated. Responds with the updated settings.

PUT /serialization-service/packaging/participant/:participant_id/settings
Parameters
Name Type Description
authenticateit_identity_ticket header Session ticket
participant_id string Participant identifier
Example Request
{
  "item_company_prefix": [
    "9212345",
    "9523452"
  ]
}
Example Response
{
  "container_company_prefix": [
    "9212345",
    "9523452"
  ],
  "item_company_prefix": [
    "9212345",
    "9523452"
  ]
}

Aggregation

POST /serialization-service/aggregation
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session ticket
gtin gtin Source GTIN
quantity pos_int Required: Quantity of sgtin's
doc string Will be attached to packed sgtin
invoiceNumber string Query parameter
ownerInn string Query parameter
invoiceDate string Query parameter
scenarioTT 0 or 1 Required: Will be attached to packed sgtin
aggregTT 0 or 1 Will be attached to packed sgtin
pcb pos_int Required: Quantity of sgtin's in pack
type string sync (default) or async
query string RSQL query
op string RSQL operator (AND or OR)

query can be used for select of sgtins instead of invoiceNumber, ownerInn, invoiceDate

Example Request (RSQL sync)
{
  "quantity" :10,
  "scenarioTT": 1,
  "aggregTT": 1,
  "query": "field_370a21b5f7f0c15d6dfce2a406dce5d86e74ca71==\"owner111\";field_64fdc5235d65719db2313923ad30ce7fda154808==\"invoice111\"",
 "pcb":5}
}
Example Request (RSQL async)
{
  "quantity" :10,
  "scenarioTT": 1,
  "aggregTT": 1,
  "query": "field_370a21b5f7f0c15d6dfce2a406dce5d86e74ca71==\"owner111\";field_64fdc5235d65719db2313923ad30ce7fda154808==\"invoice111\"",
 "type":"async",
 "pcb":5}
}
Example Request (sync)
{
 "gtin":"03348901300124",
 "quantity" :4,
 "doc":"doc567",
 "invoiceNumber": "invoiceNumber567",
 "ownerInn": "ownerInn567",
 "invoiceDate":"2019-04-04",
 "scenarioTT":0,
 "pcb":2
}
Example Request (async)
{
 "gtin":"03348901300124",
 "quantity" :2,
 "doc":"doc567",
 "invoiceNumber": "invoiceNumber567",
 "ownerInn": "ownerInn567",
 "invoiceDate":"2019-04-04",
 "scenarioTT":0,
 "pcb":1,
 "type":"async"
}
Example Response (sync)
[
    {
        "code": "010334890130012421(gG5GJfSz+1j)\u001d91EE05\u001d923LQZZHyjoOQ1wd2TmwXlbgWrs/ei3owacH16mF3Neu4=",
        "gs1_sscc": "00077341703839200820",
        "sgtin": "urn:epc:id:sgtin:3348901.030012.(gG5GJfSz+1j)",
        "sscc": "urn:epc:id:sscc:7734170383.0920082"
    },
    {
        "code": "010334890130012421*kM)uaZjRchho\u001d91EE05\u001d923LQZZHyjoOQ1wd2TmwXlbgWrs/ei3owacH16mF3Neu4=",
        "gs1_sscc": "00077341703839200820",
        "sgtin": "urn:epc:id:sgtin:3348901.030012.*kM)uaZjRchho",
        "sscc": "urn:epc:id:sscc:7734170383.0920082"
    },
    {
        "code": "010334890130012421&1iV>*I',M:!/\u001d91EE05\u001d923LQZZHyjoOQ1wd2TmwXlbgWrs/ei3owacH16mF3Neu4=",
        "gs1_sscc": "00077341703830028614",
        "sgtin": "urn:epc:id:sgtin:3348901.030012.&1iV>*I',M:!/",
        "sscc": "urn:epc:id:sscc:7734170383.0002861"
    },
    {
        "code": "010334890130012421%:5sO<JhE:d3u\u001d91EE05\u001d923LQZZHyjoOQ1wd2TmwXlbgWrs/ei3owacH16mF3Neu4=",
        "gs1_sscc": "00077341703830028614",
        "sgtin": "urn:epc:id:sgtin:3348901.030012.%:5sO<JhE:d3u",
        "sscc": "urn:epc:id:sscc:7734170383.0002861"
    }
]
Example Response (async)
{
    "id": "1c55090c-205c-45c2-8015-d2cfc0455f52@aggregation_task"
}

Read aggregation tasks

GET /serialization-service/aggregation
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session ticket
chunk_id string Chunk ID of aggregation tasks list
Example Response
{
    "next": "urn:authenticateit:participant:804355519238230@aggregation_tasks@59e4f585-2d95-4bcb-badf-088830c60120",
    "tasks": [
        {
            "end_time": "2019-11-26T20:38:01Z",
            "id": "1c55090c-205c-45c2-8015-d2cfc0455f52@aggregation_task",
            "link": "https://dev-cdn.shping.com/2019/11/26/1c55090c-205c-45c2-8015-d2cfc0455f52@aggregation_task.csv",
            "progress": 2,
            "start_time": "2019-11-26T20:37:58Z",
            "status": "done",
            "total": 2
        }
    ]
}
Example Response
{
    "next": null,
    "tasks": [
        {
            "end_time": "2019-11-26T15:32:16Z",
            "id": "dc019878-fda6-4a39-90e8-65179361ba74@aggregation_task",
            "link": "https://dev-cdn.shping.com/2019/11/26/dc019878-fda6-4a39-90e8-65179361ba74@aggregation_task.csv",
            "progress": 1,
            "start_time": "2019-11-26T15:32:14Z",
            "status": "done",
            "total": 1
        }
    ]
}

Read aggregation task

GET /serialization-service/aggregation/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session ticket
id string Aggregation task id
Example Response
{
    "end_time": "2019-11-25T21:14:16Z",
    "id": "2226d3d5-c69e-4c9f-938b-4a92c0577540@aggregation_task",
    "link": "https://dev-cdn.shping.com/2019/11/25/2226d3d5-c69e-4c9f-938b-4a92c0577540@aggregation_task.csv",
    "progress": 4,
    "start_time": "2019-11-25T21:08:40Z",
    "status": "done",
    "total": 4
}
Example Response
{
    "end_time": null,
    "id": "034d8510-29ce-4c68-b3dd-5a5f3b3882b1@aggregation_task",
    "progress": 41,
    "start_time": "2019-11-26T20:56:10Z",
    "status": "started",
    "total": 62
}

Import sgtins

Import serialized products.

POST /serialization-service/import/sgtins
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
gtin base gtin Required: Base GTIN
task_id string Required: Task ID
quantity pos_integer Required: Total sgtins quantity for the task
sgtins list Required: List of sgtins in GS1 format
settings object Settings object
settings.labels_as_titles yes or no Labels as titles in csv header. Default no
settings.code yes or no GS1 code in csv. Default yes
settings.owner yes or no Owner id in csv. Default no
settings.delimiter string Default "|"
settings.name yes or no Export product name in csv. Default no
sources sources_object Additional sources

If the response is empty, then quantity of loaded SGTINS lower than quantity value in request.

Example Request
{
  "sgtins": [
    "010334890087198421UKy;UoI+lAOY6\u001d91EE05\u001d925sqJbVM5XQm2Gep4rUjZJgfU88b1RDyYwxud7zb10r0=",
    "010334890087198421n=uL2(cGl0\"iE\u001d91EE05\u001d92lbePGb4f4LYgietArtEc3KlIKqRVdqnNC+cOz+kddcs=",
    "010334890087198421j_r'b*k?YBf9n\u001d91EE05\u001d92u5injthuxUaXp2NIZjFOcQABYjiBblm24pFuuaWWXxU=",
    "010334890087198421VQ*jD!UF:4%V2\u001d91EE05\u001d92paYoXTV5XBHsdfM19oe/bO45k1FBx5L8kZ+jLsOhdkA=",
    "010334890087198421+>nec)I7DG&Gg\u001d91EE05\u001d92zTJ6EIcH9NKyXatK5h1ouMyRAuUq5L78jcjtOlX73Fk=",
    "0103348900871984211Ky;UoI+lAOY6\u001d91EE05\u001d925sqJbVM5XQm2Gep4rUjZJgfU88b1RDyYwxud7zb10r0=",
    "0103348900871984212=uL2(cGl0\"iE\u001d91EE05\u001d92lbePGb4f4LYgietArtEc3KlIKqRVdqnNC+cOz+kddcs=",
    "0103348900871984213_r'b*k?YBf9n\u001d91EE05\u001d92u5injthuxUaXp2NIZjFOcQABYjiBblm24pFuuaWWXxU=",
    "0103348900871984214Q*jD!UF:4%V2\u001d91EE05\u001d92paYoXTV5XBHsdfM19oe/bO45k1FBx5L8kZ+jLsOhdkA=",
    "0103348900871984215>nec)I7DG&Gg\u001d91EE05\u001d92zTJ6EIcH9NKyXatK5h1ouMyRAuUq5L78jcjtOlX73Fk=",
    "0103348900871984216Ky;UoI+lAOY6\u001d91EE05\u001d925sqJbVM5XQm2Gep4rUjZJgfU88b1RDyYwxud7zb10r0=",
    "0103348900871984217=uL2(cGl0\"iE\u001d91EE05\u001d92lbePGb4f4LYgietArtEc3KlIKqRVdqnNC+cOz+kddcs=",
    "0103348900871984218_r'b*k?YBf9n\u001d91EE05\u001d92u5injthuxUaXp2NIZjFOcQABYjiBblm24pFuuaWWXxU=",
    "0103348900871984219Q*jD!UF:4%V2\u001d91EE05\u001d92paYoXTV5XBHsdfM19oe/bO45k1FBx5L8kZ+jLsOhdkA=",
    "0103348900871984210>nec)I7DG&Gg\u001d91EE05\u001d92zTJ6EIcH9NKyXatK5h1ouMyRAuUq5L78jcjtOlX73Fk=",
    "010334890087198421aKy;UoI+lAOY6\u001d91EE05\u001d925sqJbVM5XQm2Gep4rUjZJgfU88b1RDyYwxud7zb10r0=",
    "010334890087198421b=uL2(cGl0\"iE\u001d91EE05\u001d92lbePGb4f4LYgietArtEc3KlIKqRVdqnNC+cOz+kddcs=",
    "010334890087198421c_r'b*k?YBf9n\u001d91EE05\u001d92u5injthuxUaXp2NIZjFOcQABYjiBblm24pFuuaWWXxU=",
    "010334890087198421dQ*jD!UF:4%V2\u001d91EE05\u001d92paYoXTV5XBHsdfM19oe/bO45k1FBx5L8kZ+jLsOhdkA=",
    "010334890087198421e>nec)I7DG&Gg\u001d91EE05\u001d92zTJ6EIcH9NKyXatK5h1ouMyRAuUq5L78jcjtOlX73Fk=",
    "010334890087198421fQ*jD!UF:4%V2\u001d91EE05\u001d92paYoXTV5XBHsdfM19oe/bO45k1FBx5L8kZ+jLsOhdkA=",
    "010334890087198421g>nec)I7DG&Gg\u001d91EE05\u001d92zTJ6EIcH9NKyXatK5h1ouMyRAuUq5L78jcjtOlX73Fk="
  ],
  "quantity": 22,
  "gtin": "03348900871984",
  "task_id": "198373d4-4d04-4c7f-9a5a-045b10c3bbc6",
  "sources": [
    {
      "conditions": {},
      "data": [
        {
          "text": {
            "markdown": false,
            "text": "invoiceNumber111111",
            "title": "invoiceNumber"
          }
        },
        {
          "text": {
            "markdown": false,
            "text": "ownerInn111111",
            "title": "ownerInn"
          }
        },
        {
          "text": {
            "markdown": false,
            "text": "2019-12-06",
            "title": "invoiceDate"
          }
        }
      ]
    }
  ],
  "settings": {
    "delimiter": "|"
  }
}
Example Response
{
  "id": "198373d4-4d04-4c7f-9a5a-045b10c3bbc6"
}

Create mission

POST /serialization-service/mission
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
client string Required: Client parameter
depo string Required: Depo parameter
msg_type string Required: Type parameter (GFP or GPK)
msg object or array Required: Message
Example Request
{
  "client": "SELDICO",
  "depo": "TKV",
  "msg_type": "GFP",
  "msg": [{
    "preparation_number": "19000052775",
    "order_number": "BHK-067306",
    "pallet_number": "001190000011862771",
    "gtin": "03348900871984",
    "qty": "100"
  },
  {
    "preparation_number": "19000052775",
    "order_number": "BHK-067306",
    "pallet_number": "001190000011862788",
    "gtin": "03348900871984",
    "qty": "100"
  }]
}
Example Response
[
    {
        "carton_number": "00001190000011862771",
        "epc_carton_number": "urn:epc:id:sscc:0119000.0001186277",
        "id": "46531ce1-c63c-4c15-afb2-9e4ac64912f0",
        "preparation_number": "19000052775"
    },
    {
        "carton_number": "00001190000011862788",
        "epc_carton_number": "urn:epc:id:sscc:0119000.0001186278",
        "id": "091a0212-749f-4b97-a0ce-dcb1576ae42a",
        "preparation_number": "19000052775"
    }
]
Example Request
{
  "client": "SELDICO",
  "depo": "TKV",
  "msg_type": "GPK",
  "msg": [
    {
      "preparation_number": "19000051243",
      "order_number": "CHP-715211",
      "carton_number": "001190000013055041",
      "gtin": "03348900871984",
      "qty": "50"
    },
    {
      "preparation_number": "19000051243",
      "order_number": "CHP-715211",
      "carton_number": "001190000013055034",
      "gtin": "03348900871984",
      "qty": "20"
    },
    {
      "preparation_number": "19000051243",
      "order_number": "CHP-715211",
      "carton_number": "001190000013055034",
      "gtin": "03348900871984",
      "qty": "7"
    },
    {
      "preparation_number": "19000051243",
      "order_number": "CHP-715211",
      "carton_number": "001190000013055041",
      "gtin": "03348900871984",
      "qty": "12"
    } 
  ]
}
Example Response
[
    {
        "carton_number": "00001190000013055041",
        "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
        "id": "bf505b51-e2e4-4e6f-9fab-4341c9cb3047",
        "preparation_number": "19000051243"
    },
    {
        "carton_number": "00001190000013055034",
        "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
        "id": "559b3ad3-c32d-4b47-96fa-828cac9d375d",
        "preparation_number": "19000051243"
    },
    {
        "carton_number": "00001190000013055034",
        "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
        "id": "031d6c9d-5c13-440e-961f-efc0984df158",
        "preparation_number": "19000051243"
    },
    {
        "carton_number": "00001190000013055041",
        "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
        "id": "a0ab02a7-4864-42fe-a602-2cf27a8f3984",
        "preparation_number": "19000051243"
    }
]

Read mission state

Workflow of read mission identifier by sscc code:
1) Get the schema (GET /index-service/index-schema) with the type sscc
2) find record where gs1_id = sscc code by RSQL
3) get mission identifier from mission_id field. If mission_id is NULL then there are no attached mission

POST /serialization-service/mission/state
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
mission string Required: Mission ID
Example Request
{ "mission": "19000051243" }
Example Response
{
    "list": [
        {
            "carton_number": "00001190000013055041",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
            "gtin": "03348900871984",
            "id": "bf505b51-e2e4-4e6f-9fab-4341c9cb3047",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 50,
            "ts": "2019-12-25T09:01:05Z"
        },
        {
            "carton_number": "00001190000013055041",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
            "gtin": "03348900871984",
            "id": "a0ab02a7-4864-42fe-a602-2cf27a8f3984",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 12,
            "ts": "2019-12-25T09:01:05Z"
        },
        {
            "carton_number": "00001190000013055034",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
            "gtin": "03348900871984",
            "id": "559b3ad3-c32d-4b47-96fa-828cac9d375d",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 20,
            "ts": "2019-12-25T09:01:05Z"
        },
        {
            "carton_number": "00001190000013055034",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
            "gtin": "03348900871984",
            "id": "031d6c9d-5c13-440e-961f-efc0984df158",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 7,
            "ts": "2019-12-25T09:01:05Z"
        }
    ],
    "mission_id": "19000051243",
    "owner": "urn:authenticateit:participant:804355519238230"
}
Example Request
{ "mission": "19000052775" }
Example Response
{
    "list": [
        {
            "carton_number": "00001190000011862771",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001186277",
            "gtin": "03348900871984",
            "id": "46531ce1-c63c-4c15-afb2-9e4ac64912f0",
            "mission_type": "GFP",
            "order_number": "BHK-067306",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000052775",
            "qty": 100,
            "ts": "2019-12-25T08:59:49Z"
        },
        {
            "carton_number": "00001190000011862788",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001186278",
            "gtin": "03348900871984",
            "id": "091a0212-749f-4b97-a0ce-dcb1576ae42a",
            "mission_type": "GFP",
            "order_number": "BHK-067306",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000052775",
            "qty": 100,
            "ts": "2019-12-25T08:59:49Z"
        }
    ],
    "mission_id": "19000052775",
    "owner": "urn:authenticateit:participant:804355519238230"
}

Attach item/items to the specific mission

PUT /serialization-service/mission/put_on
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
mission string Required: Mission ID
to_sscc string Target SSCC code
items list of objects Required: Attached items

Objects items.item has two parameters: item.code and item.to_sscc. item.code for GFP mission type is sscc GS1 code equal to item.to_sscc. item.code for GPK mission type is sgtin GS1 code.

Main to_sscc parameter will be used if item.to_sscc does not exist.

Example Request
{
  "mission": "19000051243",
  "items": [
    {
      "to_sscc": "00001190000013055041",
      "code": "010334890087198421WfXSEbOPuSWYQ\u001d91TEST\u001d92MDAwMJV78cO2vaLtCiZIYhycfF194aro/YW4Iix0TSk="
    },
    {
      "to_sscc": "00001190000013055041",
      "code": "01033489008719842174h!;whVr_Llx\u001d91TEST\u001d92MDAwMFr6LuzpYKBfunU0uOXGOQ+nW1PDvrSVqButswI="
    }
  ]
}
Example Response
{
    "list": [
        {
            "carton_number": "00001190000013055034",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
            "gtin": "03348900871984",
            "id": "f437443a-9593-4205-a0ec-3a0d5adb293a",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 20,
            "ts": "2019-12-25T09:57:44Z"
        },
        {
            "carton_number": "00001190000013055041",
            "client": "SELDICO",
            "collected": [
                {
                    "code": "01033489008719842174h!;whVr_Llx\u001d91TEST\u001d92MDAwMFr6LuzpYKBfunU0uOXGOQ+nW1PDvrSVqButswI=",
                    "sgtin": "urn:epc:id:sgtin:3348900.087198.74h!;whVr_Llx"
                },
                {
                    "code": "010334890087198421WfXSEbOPuSWYQ\u001d91TEST\u001d92MDAwMJV78cO2vaLtCiZIYhycfF194aro/YW4Iix0TSk=",
                    "sgtin": "urn:epc:id:sgtin:3348900.087198.WfXSEbOPuSWYQ"
                }
            ],
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
            "gtin": "03348900871984",
            "id": "716645ca-acb8-429d-91e4-23e215a2497f",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 12,
            "ts": "2019-12-25T09:57:44Z"
        },
        {
            "carton_number": "00001190000013055034",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
            "gtin": "03348900871984",
            "id": "458e8fab-a544-4eb5-83a0-1ad777fcb159",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 7,
            "ts": "2019-12-25T09:57:44Z"
        },
        {
            "carton_number": "00001190000013055041",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
            "gtin": "03348900871984",
            "id": "245c566b-322c-4122-845d-4285a2453711",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 50,
            "ts": "2019-12-25T09:57:44Z"
        }
    ],
    "locked": true,
    "mission_id": "19000051243",
    "owner": "urn:authenticateit:participant:804355519238230"
}
Example Request
{
  "mission": "19000052775",
  "items": [
    {
      "to_sscc": "00001190000011862788",
      "code": "00001190000011862788"
    }
  ]
}
Example Response
{
    "list": [
        {
            "carton_number": "00001190000011862788",
            "client": "SELDICO",
            "collected": [
                {
                    "code": "00001190000011862788"
                }
            ],
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001186278",
            "gtin": "03348900871984",
            "id": "878cda31-fca3-4e1c-a33c-b9c65b82a8c4",
            "mission_type": "GFP",
            "order_number": "BHK-067306",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000052775",
            "qty": 100,
            "ts": "2019-12-25T09:53:46Z"
        },
        {
            "carton_number": "00001190000011862771",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001186277",
            "gtin": "03348900871984",
            "id": "2a55a500-9691-4554-b221-df256a58ddd9",
            "mission_type": "GFP",
            "order_number": "BHK-067306",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000052775",
            "qty": 100,
            "ts": "2019-12-25T09:53:46Z"
        }
    ],
    "locked": true,
    "mission_id": "19000052775",
    "owner": "urn:authenticateit:participant:804355519238230"
}

Deattach item/items from the specific mission

PUT /serialization-service/mission/put_off
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
mission string Required: Mission ID
to_sscc string Target SSCC code
items list of objects Required: Attached items

Objects items.item has two parameters: item.code and item.to_sscc. item.code for GFP mission type is sscc GS1 code equal to item.to_sscc. item.code for GPK mission type is sgtin GS1 code.

Main to_sscc parameter will be used if item.to_sscc does not exist.

Example Request
{
  "mission": "19000051243",
  "items": [
    {
      "to_sscc": "00001190000013055041",
      "code": "010334890087198421WfXSEbOPuSWYQ\u001d91TEST\u001d92MDAwMJV78cO2vaLtCiZIYhycfF194aro/YW4Iix0TSk="
    }
  ]
}
Example Response
{
    "list": [
        {
            "carton_number": "00001190000013055034",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
            "gtin": "03348900871984",
            "id": "f437443a-9593-4205-a0ec-3a0d5adb293a",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 20,
            "ts": "2019-12-25T09:57:44Z"
        },
        {
            "carton_number": "00001190000013055041",
            "client": "SELDICO",
            "collected": [
                {
                    "code": "01033489008719842174h!;whVr_Llx\u001d91TEST\u001d92MDAwMFr6LuzpYKBfunU0uOXGOQ+nW1PDvrSVqButswI=",
                    "sgtin": "urn:epc:id:sgtin:3348900.087198.74h!;whVr_Llx"
                }
            ],
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
            "gtin": "03348900871984",
            "id": "716645ca-acb8-429d-91e4-23e215a2497f",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 12,
            "ts": "2019-12-25T09:57:44Z"
        },
        {
            "carton_number": "00001190000013055034",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305503",
            "gtin": "03348900871984",
            "id": "458e8fab-a544-4eb5-83a0-1ad777fcb159",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 7,
            "ts": "2019-12-25T09:57:44Z"
        },
        {
            "carton_number": "00001190000013055041",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001305504",
            "gtin": "03348900871984",
            "id": "245c566b-322c-4122-845d-4285a2453711",
            "mission_type": "GPK",
            "order_number": "CHP-715211",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000051243",
            "qty": 50,
            "ts": "2019-12-25T09:57:44Z"
        }
    ],
    "locked": true,
    "mission_id": "19000051243",
    "owner": "urn:authenticateit:participant:804355519238230"
}
Example Request
{
  "mission": "19000052775",
  "items": [
    {
      "to_sscc": "00001190000011862788",
      "code": "00001190000011862788"
    }
  ]
}
Example Response
{
    "list": [
        {
            "carton_number": "00001190000011862788",
            "client": "SELDICO",
            "collected": [],
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001186278",
            "gtin": "03348900871984",
            "id": "878cda31-fca3-4e1c-a33c-b9c65b82a8c4",
            "mission_type": "GFP",
            "order_number": "BHK-067306",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000052775",
            "qty": 100,
            "ts": "2019-12-25T09:53:46Z"
        },
        {
            "carton_number": "00001190000011862771",
            "client": "SELDICO",
            "depo": "TKV",
            "epc_carton_number": "urn:epc:id:sscc:0119000.0001186277",
            "gtin": "03348900871984",
            "id": "2a55a500-9691-4554-b221-df256a58ddd9",
            "mission_type": "GFP",
            "order_number": "BHK-067306",
            "participant": "urn:authenticateit:participant:804355519238230",
            "preparation_number": "19000052775",
            "qty": 100,
            "ts": "2019-12-25T09:53:46Z"
        }
    ],
    "locked": true,
    "mission_id": "19000052775",
    "owner": "urn:authenticateit:participant:804355519238230"
}

Validate mission according SLI/SL1

POST /serialization-service/mission/validate
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
preparation_number string Required: Mission ID
gtins string List of required GTINs
type string Required: sli or sl1
containers object Required: sli or sl1
containers.qty integer Required: Quantity in container
containers.id object Required: container id (SSCC code)
Example Request
{
  "preparation_number": "400000000631",
  "gtins":["03348901489157", "03348901487528"],
  "type":"sl1",
  "containers": [
    {
      "qty": 4,
      "id": "001300000000122454"
    }
  ]
}
Example Response
[
    {
        "00001300000000122454": [
            {
                "code": "010334890148752821YS=HmhMQ<g2.B\u001d91EE05\u001d92gF3jaA99RKBLOViAe1akW9nMYKQlgV/NKm8nVTFAcJM=",
                "gtin": "03348901487528",
                "id": "urn:epc:id:sgtin:3348901.048752.YS=HmhMQ<g2.B",
                "sscc": "urn:epc:id:sscc:0130000.0000012245"
            },
            {
                "code": "010334890148752821zk:Y7JXoCU*<N\u001d91EE05\u001d92gF3jaA99RKBLOViAe1akW9nMYKQlgV/NKm8nVTFAcJM=",
                "gtin": "03348901487528",
                "id": "urn:epc:id:sgtin:3348901.048752.zk:Y7JXoCU*<N",
                "sscc": "urn:epc:id:sscc:0130000.0000012245"
            },
            {
                "code": "010334890148752821Zn_=Bp=%.&2.Z\u001d91EE05\u001d92gF3jaA99RKBLOViAe1akW9nMYKQlgV/NKm8nVTFAcJM=",
                "gtin": "03348901487528",
                "id": "urn:epc:id:sgtin:3348901.048752.Zn_=Bp=%.&2.Z",
                "sscc": "urn:epc:id:sscc:0130000.0000012245"
            },
            {
                "code": "010334890148915721Qme9+OPtZMhgD\u001d91EE05\u001d92gF3jaA99RKBLOViAe1akW9nMYKQlgV/NKm8nVTFAcJM=",
                "gtin": "03348901489157",
                "id": "urn:epc:id:sgtin:3348901.048915.Qme9+OPtZMhgD",
                "sscc": "urn:epc:id:sscc:0130000.0000012245"
            }
        ]
    }
]

Merge containers

POST /serialization-service/packaging/container/merge
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
sscc_from string Required: Source SSCC code
sscc_to string Required: Destination SSCC code
Example Request
{
  "sscc_from": "urn:epc:id:sscc:7734170383.0001090",
  "sscc_to": "urn:epc:id:sscc:7734170383.0001091"
}

Disaggragate container

POST /serialization-service/packaging/container/disaggragate
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
sscc string Required: SSCC code
Example Request
{
  "sscc": "urn:epc:id:sscc:7734170383.0001091"
}

Pack items to container

PUT /packaging/items/pack
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
sscc string Required: SSCC code
items string Required: List of SGTIN's or list of SSCC's
Example Request
{
  "sscc": "urn:epc:id:sscc:7734170383.0001092",
  "items": [
      "urn:epc:id:sgtin:3348900.087198.!\":Oov+ffaCS)",
      "urn:epc:id:sgtin:3348900.087198.!!pDlI5LU3K9+"
  ]
}
Example Request
{
  "sscc": "urn:epc:id:sscc:7734170383.0001093",
  "items": [
      "urn:epc:id:sscc:7734170383.0001091",
      "urn:epc:id:sscc:7734170383.0001092"
  ]
}

Unpack items from container

PUT /packaging/items/unpack
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
sscc string Required: SSCC code
items string Required: List of SGTIN's or list of SSCC's
Example Request
{
  "sscc": "urn:epc:id:sscc:7734170383.0001092",
  "items": [
      "urn:epc:id:sgtin:3348900.087198.!\":Oov+ffaCS)",
      "urn:epc:id:sgtin:3348900.087198.!!pDlI5LU3K9+"
  ]
}
Example Request
{
  "sscc": "urn:epc:id:sscc:7734170383.0001093",
  "items": [
      "urn:epc:id:sscc:7734170383.0001091",
      "urn:epc:id:sscc:7734170383.0001092"
  ]
}

results matching ""

    No results matching ""