Get all Orders

GET REST API request that returns a list of all current orders linked to a merchant. The response example is shown below.

The parameter orderId will try to find an order by orderId and return it in the response list. The filter parameter statusGroup will filter orders by order status group. Two possible values for this filter are SG_FOR_CONFIRMATION (return all orders that need to be confirmed) and SG_PROCESSED (return all orders that are processed). Both of these parameters are optional.

The other two parameters are page and size, which are used for pagination. If not passed, by default, only 10 orders will be listed. However, by setting the size to higher values, the list can be increased. The maximum number of orders per page is 100.

Request

HTTP MethodGET
URLStagehttps://api.stage.ananastest.com/order/api/v1/merchant-integration/orders
Productionhttps://api.ananas.rs/order/api/v1/merchant-integration/orders
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}
URL Parameters
Parameter nameParameter description
orderIdFind order by orderId and return it in the response list
statusGroupFilter orders by order status group (SG_FOR_CONFIRMATION or SG_PROCESSED)
pagePagination - page number
sizePagination - number of orders per page (max 100)
dateFromOrder created date from filter in yyyy-MM-dd'T'HH:mm:ss.SSSXXX format (e.g., 2023-11-15T00:00:00Z)
dateToOrder created date to filter in yyyy-MM-dd'T'HH:mm:ss.SSSXXX format (e.g., 2023-11-16T00:00:00Z)

Response

Response is a collection of order details.

The API method defaults sorting by “orderCreatedDate” in descending order.

Field NameTypeDescription
contentList<OrderDetails>List of orders with details
pageablePageableDetails of pagination
totalPagesintNumber of total pages
totalElementslongTotal amount of elements
lastbooleanIndicates if it's the last page
sizeIntegerSize
numberintNumber of items on that page
sortSortDetails about sorting
numberOfElementslongNumber of elements
firstbooleanFirst
emptybooleanEmpty

Pageable

Field NameTypeDescription
sortSortDetails about sorting
offsetLongOffset
pageSizeintPage size
pageNumberintPage number
pagedbooleanPaged
unpagedbooleanUnpaged

Sort:

Field NameTypeDescription
emptybooleanEmpty
unsortedbooleanUnsorted
sortedbooleanSorted

OrderDetails

Field NameTypeDescription
idStringUnique order identifier
createdDateLocalDateTimeDate of creation in UTC
totalPriceBigDecimalTotal price of an order
currencyStringPrice currency
paymentMethodList<String>List of order payment methods. Possible values:
  • COD - cash on delivery
  • PBC - pay by card
  • POS - pay on site
  • VOUCHER - paid by voucher
numberOfItemsLongNumber of items that belong to the order
sumOfItemOrderedQuantitiesLongSum of all quantities of all items that are belonging to an order
itemsList<ItemDetails>List of items
billingAddressAddressDto Billing address for this order, nullable

ItemDetails

Field NameTypeDescription
idStringUnique item identifier
suborderWarehouseAddressIdLongUnique warehouse address identifier
quantityIntegerItem ordered quantity
confirmedQuantityIntegerItem confirmed quantity
packedQuantityIntegerItem packed quantity
vatBigDecimalVat percentage
basePriceBeforeDeductionsWithoutVatBigDecimalSellable price without discount and without vat
basePriceBeforeDeductionsBigDecimalSellable price without discount and with vat
basePriceWithoutVatBigDecimalSellable price with discount and without vat
basePriceBigDecimalSellable price with discount and with vat included
grandTotalWithoutVatBigDecimalSum of item sellable price without vat
grandTotalBigDecimalSum of items sellable price without vat
takeRateIntegerTake rate
takeRateBasePriceBigDecimalTake rate base price
takeRateTotalBigDecimalTake rate total price
shippingCostBigDecimalPrice of shipping cost with vat and discount included
shippingCostWithoutVatBigDecimalPrice of shipping cost with discount and without vat
shippingCostVatBigDecimalShipping cost vat percentage
shippingCostBasePriceBigDecimalPrice of shipping cost without discount and with vat included
shippingCostBasePriceWithoutVatBigDecimalPrice of shipping cost without discount and vat
shippingCostAdjustmentBigDecimalShipping cost adjustment value
chargedPriceBigDecimalPrice charged to the customer
chargedPriceWithoutVatBigDecimalPrice charged to the customer without vat
paymentDataList<PaymentDetails>List of payment details
merchantMerchantDetailsMerchant details
productIdStringUnique product identifier
productEanStringEuropean Article Number
productACodeStringAnanas code of product
productApidStringAnanas product identifier
assetRootUrlStringRoot URL
thumbnailBaseUrlStringThumbnail base URL
productSkuStringStock Keeping Unit of product
luxbooleanIndicator to show whether the item is lux or not
productNameStringProduct name – this field will be populated based on the language passed in the Accept-Language header.
imageStringJSON that contains data related to product image - this field will be populated based on the language passed in the Accept-Language header.
specificationsTranslationsStringAttributes of the item like color, size, material type, weight, etc. - this field will be populated based on the language passed in the Accept-Language header.
translationsList<TranslationDetails>List of translation details
shippingEligibleQuantityIntegerQuantity eligible for shipping
grandTotalBasePriceBeforeDeductionsBigDecimalTotal price without discount

PaymentDetails

Field NameTypeDescription
paymentMethodStringPossible values:
  • COD - cash on delivery
  • PBC - pay by card
  • POS - pay on site
  • VOUCHER - paid by voucher
paidAmountBigDecimalPaid amount
paidAmountAdjustmentBigDecimalPaid amount adjustment

MerchantDetails

Field NameTypeDescription
idStringUnique merchant identifier
nameStringMerchant name
codeStringMerchant code

TranslationDetails

Field NameTypeDescription
nameStringProduct name
coverImageStringJSON that contains data related to product image
specificationStringAttributes of item like color, size, material type, weight, etc.
languageStringLanguage into which the above-mentioned fields have been translated

Example of request:

JSON:

Click to copy
Success!
{
  "content": [
    {
      "id": "HPGUJ-1SQQI",
      "createdDate": "2023-05-26T12:38:47.234741Z",
      "totalPrice": 45.0,
      "currency": "RSD",
      "paymentMethods": [
        "PBC",
        "VOUCHER"
      ],
      "numberOfItems": 1,
      "sumOfItemOrderedQuantities": 1,
      "billingAddress": {
        "type": "BILLING",
        "firstName": "John",
        "lastName": "Doe",
        "city": "New York",
        "postcode": "10512",
        "streetName": "Woodland Hills Rd",
        "streetNumber": "12",
        "apartmentNumber": "21b",
        "additionalInfo": "Elevator is not working, take the stairs",
        "buyerType": "TIN",
        "buyerId": "113095370",
        "buyerName": "SpaceX"
      },
      "items": [
        {
          "id": "1776591",
          "suborderWarehouseAddressId": 987,
          "quantity": 1,
          "confirmedQuantity": null,
          "packedQuantity": null,
          "vat": 20.0,
          "basePriceBeforeDeductionsWithoutVat": 41.67,
          "basePriceBeforeDeductions": 50.0,
          "basePriceWithoutVat": 37.5,
          "basePrice": 45.0,
          "grandTotalWithoutVat": 37.5,
          "grandTotal": 45.0,
          "takeRate": 10,
          "takeRateBasePrice": 4.5,
          "takeRateTotal": 4.5,
          "shippingCost": 249.0,
          "shippingCostWithoutVat": 207.5,
          "shippingCostVat": 20.0,
          "shippingCostBasePrice": 249.0,
          "shippingCostBasePriceWithoutVat": 207.5,
          "shippingCostAdjustment": 0.0,
          "chargedPrice": 45.0,
          "chargedPriceWithoutVat": 37.5,
          "paymentData": [
            {
              "paymentMethod": "VOUCHER",
              "paidAmount": 45.0,
              "paidAmountAdjustment": 0.0
            }
          ],
          "merchant": {
            "id": 309,
            "name": "Maxi Taxi",
            "code": "XN8ACP301C"
          },
          "productId": "5715daab-f0de-4555-929d-dcd6f56a1c19",
          "productEan": "584763589715",
          "productACode": null,
          "productApid": "5P4RKOJYKU",
          "assetRootUrl": "https://static.dev.ananastest.com",
          "thumbnailBaseUrl": "https://static.dev.ananastest.com",
          "productSku": "VOJASKU",
          "lux": false,
          "productName": "Inter Olovka",
          "image": "{\"key\":\"CoverImage\",\"trait\":\"Glavna fotografija\",\"type\":\"ImageAttribute\",\"image\":{\"path\":\"/assets/Product_Images/BallpointPens/inter_olovka/8271b1731dfc9318.jpeg\",\"width\":700,\"height\":525},\"thumbnail\":{\"path\":\"/tmp/image-thumbnails/Product_Images/BallpointPens/inter_olovka/image-thumb__85840__product_thumbnail/8271b1731dfc9318.jpeg\",\"width\":240,\"height\":180}}",
          "specifications": "{\"attributes\": [{\"key\": \"features_14764\", \"type\": \"CompositeAttribute\", \"trait\": \"Karakteristike\", \"attributes\": [{\"hex\": \"#000000\", \"key\": \"Color\", \"name\": \"Crna\", \"type\": \"ColorAttribute\", \"trait\": \"Boja\", \"multicolor\": false}]}]}",
          "translations": [
            {
              "name": "Inter Olovka",
              "coverImage": "{\"key\":\"CoverImage\",\"trait\":\"Glavna fotografija\",\"type\":\"ImageAttribute\",\"image\":{\"path\":\"/assets/Product_Images/BallpointPens/inter_olovka/8271b1731dfc9318.jpeg\",\"width\":700,\"height\":525},\"thumbnail\":{\"path\":\"/tmp/image-thumbnails/Product_Images/BallpointPens/inter_olovka/image-thumb__85840__product_thumbnail/8271b1731dfc9318.jpeg\",\"width\":240,\"height\":180}}",
              "specification": "{\"attributes\": [{\"key\": \"features_14764\", \"type\": \"CompositeAttribute\", \"trait\": \"Karakteristike\", \"attributes\": [{\"hex\": \"#000000\", \"key\": \"Color\", \"name\": \"Black\", \"type\": \"ColorAttribute\", \"trait\": \"Boja\", \"multicolor\": false}]}]}",
              "language": "en"
            },
            {
              "name": "Inter Olovka",
              "coverImage": "{\"key\":\"CoverImage\",\"trait\":\"Glavna fotografija\",\"type\":\"ImageAttribute\",\"image\":{\"path\":\"/assets/Product_Images/BallpointPens/inter_olovka/8271b1731dfc9318.jpeg\",\"width\":700,\"height\":525},\"thumbnail\":{\"path\":\"/tmp/image-thumbnails/Product_Images/BallpointPens/inter_olovka/image-thumb__85840__product_thumbnail/8271b1731dfc9318.jpeg\",\"width\":240,\"height\":180}}",
              "specification": "{\"attributes\": [{\"key\": \"features_14764\", \"type\": \"CompositeAttribute\", \"trait\": \"Karakteristike\", \"attributes\": [{\"hex\": \"#000000\", \"key\": \"Color\", \"name\": \"Crna\", \"type\": \"ColorAttribute\", \"trait\": \"Boja\", \"multicolor\": false}]}]}",
              "language": "sr"
            }
          ],
          "shippingEligibleQuantity": 1,
          "grandTotalBasePriceBeforeDeductions": 50.0
        }
      ]
    }
  ],
  "pageable": {
    "sort": {
      "empty": false,
      "unsorted": false,
      "sorted": true
      },
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 1,
    "paged": true,
    "unpaged": false
  },
  "last": true,
  "totalElements": 1,
  "totalPages": 1,
  "size": 10,
  "number": 0,
  "sort": {
    "empty": false,
    "unsorted": false,
    "sorted": true
   },
  "first": true,
  "numberOfElements": 1,
  "empty": false
  }
Copyright © Ananas 2023. All right reserved.