Get all invoice URLs

GET REST API request that returns a list of all invoice URLs that are linked to the merchant. The response example is shown below. Filtering documents is done in two ways regarding parameters that can be passed.

First is directly by passing collection of suborder ids and for those suborders we are fetching invoice URLs.

The second is by the date-range filter. Along with date parameters also we can pass the non-required parameter “type. It is given with string value FISCAL or NON_FISCAL, which will filter out invoice URLs by type. If this parameter is not provided, all invoice URLs will be returned. Non-fiscal merchants will not be able to get invoice URLs with parameter type FISCAL, response will be a bad request. On the other hand, fiscal merchants can query non-fiscal invoice URLs.

Parameters “dateFrom” and “dateTo” are zoned dates with time and are required and inclusive. They represent time range for invoiced dates. The date from is only viable from 1stof May 2022, and date range cannotbe longer than 3 months. Examples:

https://api.stage.ananastest.com/order/api/v1/merchant-integration/invoices/urls?dateFrom=2022-05-01T10:20:45.1457765Z&dateTo=2022-06-07T10:20:45.1457765Z&type=FISCAL

https://api.stage.ananastest.com/order/api/v1/merchant-integration/invoices/urls?suborderIds=XJLV3-CBHLH-DS-1

Request

HTTP MethodGET
URLStagehttps://api.stage.ananastest.com/order/api/v1/merchant-integration/invoices/urls
Productionhttps://api.ananas.rs/order/api/v1/merchant-integration/invoices/urls
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}
URL Parameters
Parameter nameParameter description
typeFISCAL, NON_FISCAl (filters invoices by type)
dateFromReferes to invoicedDateDate must be sent with time zone
dateToReferes to invoicedDateDate must be sent with time zone
suborderIdsCollection of suborder ids for which we issue fetching invoice document URLs.

Response

The response is a map of Invoice URLs. The key is the suborder for which we issued the document, and the value is thelist ofobjectswith the link and id of the document.

Invoice URLs

Fields nameTypeDescription
documentCorrelationIdStringThe documentCorrelationId is a unique identification of a document. It is referred to the invoiceId field from the document table.
linkStringLink to PDF document.

Example of response:

Click to copy
Success!
{
  "XJLV3-CHBLH-DS-1": [
    {
      "documentCorrelationId": "0429118274",
      "link": "https://ananas-dev1-logistics.s3.eu-central-1.amazonaws.com/order/XJLV3-CHBLH/invoice/080822_1848_Makidoo_Fiskalni_Ra%C4%8Dun_XJLV3-CHBLH_DS.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220823T080849Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=AKIA22VGE46BRDXKOUWD%2F20220823%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=7b7f22f6993b10ac892b073c0bb84c9a17acb71d1825ee65336081decccd242f"
    }
  ]
}
Copyright © Ananas 2023. All right reserved.