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 Method | GET | |||||||||||||||
URL | Stage | https://api.stage.ananastest.com/order/api/v1/merchant-integration/orders | ||||||||||||||
Production | https://api.ananas.rs/order/api/v1/merchant-integration/orders | |||||||||||||||
HTTP Headers |
| |||||||||||||||
URL Parameters |
|
Response
Response is a collection of order details.
The API method defaults sorting by “orderCreatedDate” in descending order.
Field Name | Type | Description |
content | List<OrderDetails> | List of orders with details |
pageable | Pageable | Details of pagination |
totalPages | int | Number of total pages |
totalElements | long | Total amount of elements |
last | boolean | Indicates if it's the last page |
size | Integer | Size |
number | int | Number of items on that page |
sort | Sort | Details about sorting |
numberOfElements | long | Number of elements |
first | boolean | First |
empty | boolean | Empty |
Pageable
Field Name | Type | Description |
sort | Sort | Details about sorting |
offset | Long | Offset |
pageSize | int | Page size |
pageNumber | int | Page number |
paged | boolean | Paged |
unpaged | boolean | Unpaged |
Sort:
Field Name | Type | Description |
empty | boolean | Empty |
unsorted | boolean | Unsorted |
sorted | boolean | Sorted |
OrderDetails
Field Name | Type | Description |
id | String | Unique order identifier |
createdDate | LocalDateTime | Date of creation in UTC |
totalPrice | BigDecimal | Total price of an order |
currency | String | Price currency |
paymentMethod | List<String> | List of order payment methods. Possible values:
|
numberOfItems | Long | Number of items that belong to the order |
sumOfItemOrderedQuantities | Long | Sum of all quantities of all items that are belonging to an order |
items | List<ItemDetails> | List of items |
billingAddress | AddressDto | Billing address for this order, nullable |
ItemDetails
Field Name | Type | Description |
id | String | Unique item identifier |
suborderWarehouseAddressId | Long | Unique warehouse address identifier |
quantity | Integer | Item ordered quantity |
confirmedQuantity | Integer | Item confirmed quantity |
packedQuantity | Integer | Item packed quantity |
vat | BigDecimal | Vat percentage |
basePriceBeforeDeductionsWithoutVat | BigDecimal | Sellable price without discount and without vat |
basePriceBeforeDeductions | BigDecimal | Sellable price without discount and with vat |
basePriceWithoutVat | BigDecimal | Sellable price with discount and without vat |
basePrice | BigDecimal | Sellable price with discount and with vat included |
grandTotalWithoutVat | BigDecimal | Sum of item sellable price without vat |
grandTotal | BigDecimal | Sum of items sellable price without vat |
takeRate | Integer | Take rate |
takeRateBasePrice | BigDecimal | Take rate base price |
takeRateTotal | BigDecimal | Take rate total price |
shippingCost | BigDecimal | Price of shipping cost with vat and discount included |
shippingCostWithoutVat | BigDecimal | Price of shipping cost with discount and without vat |
shippingCostVat | BigDecimal | Shipping cost vat percentage |
shippingCostBasePrice | BigDecimal | Price of shipping cost without discount and with vat included |
shippingCostBasePriceWithoutVat | BigDecimal | Price of shipping cost without discount and vat |
shippingCostAdjustment | BigDecimal | Shipping cost adjustment value |
chargedPrice | BigDecimal | Price charged to the customer |
chargedPriceWithoutVat | BigDecimal | Price charged to the customer without vat |
paymentData | List<PaymentDetails> | List of payment details |
merchant | MerchantDetails | Merchant details |
productId | String | Unique product identifier |
productEan | String | European Article Number |
productACode | String | Ananas code of product |
productApid | String | Ananas product identifier |
assetRootUrl | String | Root URL |
thumbnailBaseUrl | String | Thumbnail base URL |
productSku | String | Stock Keeping Unit of product |
lux | boolean | Indicator to show whether the item is lux or not |
productName | String | Product name – this field will be populated based on the language passed in the Accept-Language header. |
image | String | JSON that contains data related to product image - this field will be populated based on the language passed in the Accept-Language header. |
specificationsTranslations | String | Attributes 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. |
translations | List<TranslationDetails> | List of translation details |
shippingEligibleQuantity | Integer | Quantity eligible for shipping |
grandTotalBasePriceBeforeDeductions | BigDecimal | Total price without discount |
PaymentDetails
Field Name | Type | Description |
paymentMethod | String | Possible values:
|
paidAmount | BigDecimal | Paid amount |
paidAmountAdjustment | BigDecimal | Paid amount adjustment |
MerchantDetails
Field Name | Type | Description |
id | String | Unique merchant identifier |
name | String | Merchant name |
code | String | Merchant code |
TranslationDetails
Field Name | Type | Description |
name | String | Product name |
coverImage | String | JSON that contains data related to product image |
specification | String | Attributes of item like color, size, material type, weight, etc. |
language | String | Language into which the above-mentioned fields have been translated |
Example of request:
JSON:
{
"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
}