Request for unit identifiers

Example

 POST https://idissuer.pl/api/v3/identifiers/unit/requests
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}} 
 {
   "economicOperatorId": "PWPK0000001",
   "facilityId": "PWPK0000002",
   "processType": false,
   "machineId": "",
   "routeData": {
     "intendedMarket": "PL",
     "intendedRoute": "",
     "fromOutOfUE": false
   },
   "productData": {
     "cnCode": "Code",
     "productBrand": "Brand",
     "productType": "Cigarette",
     "productTypeDescription": "",
     "productWeight": 15,
     "euCegIdentifier": "12345-12-12345",
     "euCegProductNumber": "12345678901",
     "subTypeName": "",
     "units": 10,
     "optionalId": ""
   },
   "reqQuantity": 15000,
   "processImmediately": false
 }
                 

"processType" - is machine used in process
"processImmediately" - option "true" results in processing of the request without 24-hour waiting period for a possible cancellation decision.

Response

 HTTP/1.1 201 Created
 Connection: close
 Date: Thu, 11 Jan 2024 09:23:37 GMT
 Content-Type: application/json; charset=utf-8
 Location: /api/v3/identifiers/unit/requests/13
 {
     "requestId": 13
 }
                 

Get details of request for unit identifiers

Example

 GET https://idissuer.pl/api/v3/identifiers/unit/requests/10
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}}
                               

Response

 HTTP/1.1 200 OK
 Date: Thu, 11 Jan 2024 09:42:24 GMT
 Content-Type: application/json; charset=utf-8
 {
     "requestId": 23,
     "economicOperatorId": "PWPK0000001",
     "facilityId": "PWPK0000002",
     "processType": false,
     "machineId": null,
     "routeData": {
         "intendedMarket": "PL",
         "intendedRoute": null,
         "fromOutOfUE": false
     },
     "productData": {
         "cnCode": "Code",
         "productBrand": "Brand",
         "productType": "Cigarette",
         "productTypeDescription": "",
         "productWeight": 15.00,
         "euCegIdentifier": "12345-12-12345",
         "euCegProductNumber": "12345678901",
         "subTypeName": null,
         "units": 10,
         "optionalId": ""
     },
     "reqQuantity": 15000,
     "processImmediately": false,
     "createdOn": "2024-01-11T14:14:31.5626684+00:00",
     "status": "Accepted",
     "rejectionReason": null,
     "createdBy": "user@test.pl"
 }
 

Unit identifiers request states

New
Rejected - request rejected
Accepted - request accepted, awaiting 24 hours for cancellation
CanceledByClient - request cancelled
PassedToGeneration - request accepted without possibility for cancellation or 24 hours cancellation period ended

Unit identifiers rejection reasons

ContractNotExisting
ContractNotValid
EONotActive
UserHasNoAccessToEO
FacilityNotActive
UserHasNoAccessToFacility
MachineNotActive
FacilityNotAssignedToEO
MachineNotAssignedToFacility
EONotExistingInRouter
FacilityNotExistingInRouter
MachineNotExistingInRouter
FacilityNotAssignedToEOInRouter
MachineNotAssignedToFacilityInRouter
SingleValueAddressExisting
LegacyTechnicalError
MachineIsRegisteredAsMachinePartInRouter

Cancellation of request for unit identifiers

Example

 PUT https://idissuer.pl/api/v3/identifiers/unit/requests/23/cancellation
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}
 {
   "economicOperatorId": "PWPK0000001",
   "cancellationReason": "Other",
   "cancellationDescription": "test description",
   "cancellationAdditionalDescription": "test additional"
 }
                         

Response

 HTTP/1.1 204 No Content
 Date: Thu, 11 Jan 2024 10:34:25 GMT
 Content-Type: application/json; charset=utf-8
                         

Unit identifiers cancellation reasons

EventNotMaterialise
ErroneousInformation
Other

Search requests for unit identifiers

Example

 GET https://idissuer.pl/api/v3/identifiers/unit/requests?economicOperatorId=PWPK0000001
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}
                                 

Search parameters

requestId
economicOperatorId
facilityId
status - status of request
createdOnFrom
createdOnTo
pageNumber
pageSize - amount of items per page (max 100)

Response

 HTTP/1.1 200 OK
 Date: Thu, 11 Jan 2024 10:34:25 GMT
 Content-Type: application/json; charset=utf-8
 {
     {
         "items": [
             {
                 "requestId": 24,
                 "economicOperatorId": "PWPK0000001",
                 "facilityId": "PWPK0000002",
                 "processType": false,
                 "machineId": null,
                 "routeData": {
                     "intendedMarket": "PL",
                     "intendedRoute": null,
                     "fromOutOfUE": false
                 },
                 "productData": {
                     "cnCode": "Code",
                     "productBrand": "Brand",
                     "productType": "Cigarette",
                     "productTypeDescription": "",
                     "productWeight": 15.00,
                     "euCegIdentifier": "12345-12-12345",
                     "euCegProductNumber": "12345678901",
                     "subTypeName": null,
                     "units": 10,
                     "optionalId": ""
                 },
                 "reqQuantity": 15000,
                 "processImmediately": true,
                 "createdBy": "userEmail@test.pl",
                 "createdOn": "2024-01-11T14:23:31.3026842+00:00",
                 "status": "PassedToGeneration"
             },
             {
                 "unitIdentifiersRequestId": 23,
                 "economicOperatorId": "PWPK0000001",
                 "facilityId": "PWPK0000002",
                 "processType": false,
                 "machineId": null,
                 "routeData": {
                     "intendedMarket": "PL",
                     "intendedRoute": null,
                     "fromOutOfUE": false
                 },
                 "productData": {
                     "cnCode": "Code",
                     "productBrand": "Brand",
                     "productType": "Cigarette",
                     "productTypeDescription": "",
                     "productWeight": 15.00,
                     "euCegIdentifier": "12345-12-12345",
                     "euCegProductNumber": "12345678901",
                     "subTypeName": null,
                     "units": 10,
                     "optionalId": ""
                 },
                 "reqQuantity": 15000,
                 "processImmediately": false,
                 "createdBy": "userEmail@test.pl",
                 "createdOn": "2024-01-11T14:14:31.5626684+00:00",
                 "status": "CanceledByClient"
             }
     ],
     "pagesCount": 1,
     "totalItemsCount": 2,
     "pageNumber": 1,
     "pageSize": 25
 }
 

Get details of unit identifiers

After request is in state "PassedToGeneration" identifiers are generated

Example

 GET https://idissuer.pl/api/v3/identifiers/unit/24
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}}
         

Response

 HTTP/1.1 200 OK
 Date: Thu, 11 Jan 2024 09:42:24 GMT
 Content-Type: application/json; charset=utf-8
{
  "requestId": 1,
  "quantity": 1000,
  "createdOn": "2023-12-21T09:00:00.000Z",
  "createdBy": "submitting.user@pwpw.pl",
  "status": "Synchronized"
}
     

Identifiers states

PassedToGeneration - waiting for generation
Generated - waiting for synchronization
Synchronized - synchronized with Dentsu - ready to download
CannotSynchronize - synchronization error - cannot be download
Downloaded
DownloadConfirmed

Search unit identifiers

Example

 GET https://idissuer.pl/api/v3/identifiers/unit?status=Synchronized
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}
                                 

Search parameters

requestId
status - status of request
createdOnFrom
createdOnTo
pageNumber
pageSize - amount of items per page (max 100)

Response

 HTTP/1.1 200 OK
 Date: Thu, 11 Jan 2024 10:34:25 GMT
 Content-Type: application/json; charset=utf-8
 {
     "items": [
         {
          "requestId": 1,
          "quantity": 1000,
          "createdOn": "2023-12-21T09:00:00.000Z",
          "createdBy": "submitting.user@pwpw.pl",
          "status": "Synchronized"
          }
     ],
     "pagesCount": 1,
     "totalItemsCount": 1,
     "pageNumber": 1,
     "pageSize": 25
 }
 

Download unit identifiers

Identifiers are ready to download when in state "Synchronized". They download as csv file with identifiers list inside.

Example

 GET https://idissuer.pl/api/v3/identifiers/unit/24/csv?format=Full
 Content-Type: application/json
 Authorization: Bearer {{AUTH_TOKEN}}
         

Identifiers format

Full
WithoutProductCode

Response

 HTTP/1.1 200 OK
 Date: Thu, 11 Jan 2024 09:42:24 GMT
 Content-Type: application/octet-stream
 Content-Disposition: attachment; filename=24.csv; filename*=UTF-8''24.csv
         

Confirm unit identifiers

Example

PUT https://idissuer.pl/api/v3/identifiers/unit/24/confirmation
Content-Type: application/json
Authorization: Bearer {{AUTH_TOKEN}}
{
  "checksum": "f741c63818a3ea47ec5492e86b1c1b2432fecb5eb4ceb3a5fe57cd6c091b91fb",
  "format": "Full"
}
            

Checksum is calculated with SHA256 from csv file.

Odpowiedź

    HTTP/1.1 204 No Content
    Date: Thu, 11 Jan 2024 09:42:24 GMT
    Content-Type: application/json; charset=utf-8