Get all invoice correction URLs

GET REST API request that returns a collection of all invoice correction 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 correction 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 correction URLs by type. If this parameter is not provided, all invoice correction URLs will be returned. Non-fiscal merchants will not be able to get invoice correction URLs with parameter type FISCAL, response will be a bad request. On the other hand, fiscal merchants can query non-fiscal invoice correction 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 cannot be longer than 3 months. Examples:

https://api.stage.ananastest.com/order/api/v1/merchant-integration/invoice-corrections/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/invoice-corrections/urls?suborderIds=XJLV3-CBHLH-DS-1

Request

HTTP MethodGET
URLStagehttps://api.stage.ananastest.com/order/api/v1/merchant-integration/invoice-corrections/urls
Productionhttps://api.ananas.rs/order/api/v1/merchant-integration/invoice-corrections/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 correction URLs. The key is the suborder for which we issued the document, and the value is the list of objects with the link and id of the document.

Invoice correction 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!
{
  "J6NC3-ZWNLD-DS-2": [
    {
      "documentCorrelationId": "D-3272020280-1",
      "link": "https://ananas-dev1-logistics.s3.eu-central-1.amazonaws.com/order/J6NC3-ZWNLD/invoice_correction/Makidoo_040822_1407_J6NC3-ZWNLD_DS_D-3272020280-1.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220823T083722Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=AKIA22VGE46BRDXKOUWD%2F20220823%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=4bbacd7949e0bf91ac6ee18a8741bd77de4d4074ce952a88ac99f93412a4ea97"
    }
  ]
}
Copyright © Ananas 2023. All right reserved.