Get Package Requests

API allows taxpayers to retrieve information on previous receipt package requests, their status.

Request Receipt Package Get Receipt Package

Overview

Get package requests API allows callers to list previously requested packages and check their status.

System limits the number of the packages that can be received in one request through implementing paging mechanism for this API.

List is ordered based on package request date descending.

Signature

API is REST based API that takes optional URL parameters to enable paging.

Signature: GET /api/v1.0/receiptpackages/requests?pageNo={pageNo}&pageSize={pageSize}

Inputs

This API accepts standard eInvoicing API header parameters for authenticated call.

URL parameters accepted:

URL parameter Type Description Value example
pageNo Number Optional: number of the page to retrieve. Typically this parameter value is derived from initial parameter less call when caller learns total amount of page of certain size 0
pageSize Number Optional: number of the packages to retrieve per page. Page size cannot exceed system configured maximum page size for this API 20

Outputs

Successful Response

API returns HTTP status code 200.

The resulting structure is part of a single object containing result structure and metadata structure.

Output parameter Type Description Value example
result Receipt Package Information[] Array of receipt package information objects See structure
metadata Metadata[] Information about the results retrieved or results matching the query See structure

Receipt Package Information

Output parameter Type Description Value example
packageId String(20) Unique ID of the package. KLJHH78NJUHQ
submissionDate DateTime The date and time of submission of the package request 2015-02-13T14:20Z
status Number Status of the package preparation. Values - 1: in progress, 2: complete, 3: error, 4: deleted 2
type Number Type of the data to return for each receipt. Values - 1: full, 2: summary. Full represents the structure of the receipt including invoice lines. Summary represents only receipt summary lines. 1
format Number Format of the data to create. Allowed values - 1: CSV (only used for summary requests), 2: XML, 3: JSON 3
requestorTypeId Number Entity which requested the package. Allowed values - 1: Intermediary, 2: Taxpayer,3: Internal User, 4: ERP 2
requestorTaxpayerRIN String(30) ID of taxpayer used either in issuer ID or receiver ID fields of the receipt 115519213
requestorTaxpayerName String(200) Name of the taxpayer used either in issuer ID or receiver ID fields of the receipt Company Name
represntedTaxpayerTypeId String(10) Type of represented taxpayer. Allowed values - Issuer, Receiver, Both Issuer
deletionDate DateTime Optional: the date and time when it is planned to remove prepared package. Has value only if status is 2: complete 2015-02-23T14:20Z
isExpired Boolean Flag ro indicate if the package is expired false
queryParams Query Parameters Query parameters to apply when creating the package JSON

Query Parameters

Output parameter Type Description Value example
dateFrom DateTime The date and time of the start of the interval requested 2015-02-13T14:20Z
dateTo DateTime The date and time of the end of the interval requested 2015-02-20T21:30Z
receiverSenderId String(50) ID of party used either in issuer ID or receiver ID fields of the receipt. Value depends on the receiverSenderType value 345987378
receiverSenderType String(10) Type of entity used either in issuer ID or receiver ID fields of the receipt with the specefied Taxpayer in requestorTaxpayerRIN. Allowed values - , 0: Business, 1: Person, 2: Foreign 0
documentTypeName String(500) receipt type requested. Allowed values - s, r in addition receipt types Receipt Types r
documentFormat String(50) Format of the data to create. Allowed values - CSV (only allowed for summary requests), JSON JSON
branchNumber String(50) Branch Number of the issuer 0
receiptUUID String(64) To filter the requested receipts by UUID 68e656b251e67e835…
submissionUUID String(64) To filter the requested receipts by submissionUUID JU7GH07JNA23N
posSerial String(200) To filter the requested receipts by POS serial number SN-123456
itemCodes String JSON string which contains an array of the item codes used in filtering line items of the receipt {"ItemCodes": [{"CodeValue": "1000000000003","CodeType": "GS1"},{"CodeValue": "EG-113317713-121212","CodeType": "EGS"}

Metadata

Output parameter Type Description Value example
totalPages Number Total count of pages based on the supplied (or default) page size 23
totalCount Number Total count of matching objects 157

Error Response

Error situations are reported back by this API through the standard error response.

No custom error codes are provided by this API.

Additional considerations

API is limited to retrieve only certain page size to prevent huge queries to be executed. Maximum page size is defined by eReceipt system administrators.

When taxpayer representative system is requesting packages, all packages requested by any representative (including person) of this taxpayer are returned.