Ananas API (1.0.0)

Download OpenAPI specification:Download

Ananas API documentation

Authorization

Get token

Get token description

SecuritybearerAuth
Request
header Parameters
X-API-Key
string
Request Body schema:
required

Optional description

grantType
string

Always "CLIENT_CREDENTIALS"

clientId
string

client Id received from merchant portal

clientSecret
string

client secret received from merchant portal

scope
string

Always "public_api/full_access"

Responses
200

Successfully returned token

400

Invalid request

500

Internal server error

post/iam/api/v1/auth/token
Request samples
{
  • "grantType": "CLIENT_CREDENTIALS",
  • "clientId": "lkajsd-12i3-0213saldk1-20",
  • "clientSecret": ";alsd,lmvs;dl,[gkllkskvlsnkdklkdllk123123=-1203=-123ldk;as012o3",
  • "scope": "public_api/full_access"
}
Response samples
application/json
{
  • "id_token": null,
  • "access_token": "lkdvslksdlkasklda;ksdpokqwepoiqwpoe;kldfg;lgfhl;tykj70567450996304953]dmmdk22323-940",
  • "refresh_token": null,
  • "expires_in": 86400,
  • "token_type": "Bearer"
}

Products

Get products

Get all products

SecuritybearerAuth
Request
query Parameters
search
string

Search by name, SKU and EAN

ean
string

Search only by ean

date-modified-after
string

Search products modified after specified date

page
string

Page number - Starts from 0

size
string

Number of products show by page

Responses
200

Successfully returned list of products

400

Invalid request

500

Internal server error

get/product/api/v1/merchant-integration/products
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

Add or edit products in bulk

Add or edit products in bulk

SecuritybearerAuth
Request
Request Body schema:
required

Optional description

name
string

Product name

description
string

Product description

coverImage
string

Product cover image

ean
string

Europian Article Number

brand
string

Product brand

gallery
Array of strings

Product images

parentEan
string

The product will be a variation of the product to which the EAN is entered

packageWeightValue
number

Package weight value

packageWeightUnit
any
Default: "KG"

Package weight unit

Enum: "KG" "G"
basePrice
number

Product price with VAT included

vat
number

Product VAT

stockLevel
integer

Stock level

sku
string

Stock keeping unit

externalId
string

Unique product identifier on merchant side

productType
string

Type of product

category
string

Main category where product belongs

object

Attributes of product like color, size, material type, type of RAM, etc.

Responses
200

Successfully

400

Invalid request

500

Internal server error

post/product/api/v1/merchant-integration/import
Request samples
{}
Response samples
application/json
{
  • "id": "afc1b015-d8fa-409e-b9d5-6b32d78d59f0"
}

Update products in bulk

Update products in bulk

SecuritybearerAuth
Request
Request Body schema:
required

Optional description

Array
id
number

Product id

packageWeightValue
number

Package weight value

packageWeightUnit
string
Default: "KG"

Package weight unit

Enum: "KG" "G"
basePrice
number

Product price with VAT included

vat
number

Product VAT

stockLevel
integer

Stock level

sku
string

Stock keeping unit

Responses
200

Successfully

400

Invalid request

404

Not found

500

Internal server error

put/product/api/v1/merchant-integration/product/bulk
Request samples
[
  • {
    },
  • {
    }
]
Response samples
application/json
[
  • {
    },
  • {
    }
]

Update single product

Update single product

SecuritybearerAuth
Request
path Parameters
id
required
integer

Product id

Request Body schema:
required

Optional description

id
integer

Product id

packageWeightValue
number

Package weight value

packageWeightUnit
any
Default: "KG"

Package weight unit

Enum: "KG" "G"
basePrice
number

Product price with VAT included

vat
number

Product VAT

stockLevel
integer

Stock level

sku
string

Stock keeping unit

Responses
200

Successfully

400

Invalid request

404

Not found

500

Internal server error

put/product/api/v1/merchant-integration/product/{id}
Request samples
{
  • "packageWeightValue": 184,
  • "packageWeightUnit": "KG",
  • "basePrice": 40000,
  • "vat": 20,
  • "stockLevel": 5,
  • "sku": "LXG9HET6O3"
}
Response samples
application/json
{
  • "status": "SUCCESS",
  • "errors": [ ],
  • "myProductId": 456
}

Get product types

Get all product types

SecuritybearerAuth
Request
header Parameters
Accept-Language
string

Desired language translation

Value: "en"
Responses
200

Successfully returned list of products

400

Invalid request

500

Internal server error

get/product/api/v1/merchant-integration/product-type
Request samples
Response samples
application/json
[
  • "Dečji pribor za kuvanje",
  • "VoIP telefonski adapteri",
  • "Rumenila"
]

Check if EAN exists

Check if EAN exists

SecuritybearerAuth
Request
Request Body schema:
required

Optional description

Array
string

EAN codes

Responses
200

Successfully

400

Invalid request

500

Internal server error

post/product/api/v1/merchant-integration/ean/exists
Request samples
[
  • "088280476892",
  • "757670268125",
  • "875441735984"
]
Response samples
application/json
{
  • "088280476892": true,
  • "757670268125": true,
  • "875441735984": true
}

Warehouses

Get merchant warehouses

Get all merchant warehouses

SecuritybearerAuth
Responses
200

Successfully returned list of merchant warehouses

400

Invalid request

500

Internal server error

get/order/api/v1/merchant-integration/merchant-warehouses
Request samples
Response samples
application/json
{
  • "content": [
    ]
}

Payment

Get all invoices

Get all invoices

SecuritybearerAuth
Request
query Parameters
dateFrom
required
string

Date from (ex 2022-05-17T23:59:00.1457765Z)

Example: dateFrom=2022-05-17T23:59:00.1457765Z
dateTo
required
string

Date to (ex 2022-05-17T23:59:00.1457765Z)

Example: dateTo=2022-05-17T23:59:00.1457765Z
type
string

Invoice type (FISCAL or NON_FISCAL)

Enum: "FISCAL" "NON_FISCAL"
Example: type=FISAL
Responses
200

Successfully retrned list of invoices

400

Invalid request

500

Internal server error

get/order/api/v1/merchant-integration/invoices
Request samples
Response samples
[]

Get all invoices corrections

Get all invoices corrections

SecuritybearerAuth
Request
query Parameters
dateFrom
required
string

Date from (ex 2022-05-17T23:59:00.1457765Z)

Example: dateFrom=2022-05-17T23:59:00.1457765Z
dateTo
required
string

Date to (ex 2022-05-17T23:59:00.1457765Z)

Example: dateTo=2022-05-17T23:59:00.1457765Z
type
string

Invoice type (FISCAL or NON_FISCAL)

Enum: "FISCAL" "NON_FISCAL"
Example: type=FISAL
Responses
200

Successfully returned list of invoices

400

Invalid request

500

Internal server error

get/order/api/v1/merchant-integration/invoice-corrections
Request samples
Response samples
[]

Get merchant inventory prices

Get merchant inventory prices

SecuritybearerAuth
Request
query Parameters
dateFrom
required
string

Present or future date for which price should be returned

merchantInventoryIds
required
string

List of merchant inventory Ids for which price should be returned with a limit of max 100 IDs

Responses
200

Successfully

400

Invalid request

404

Not found

500

Internal server error

get/payment/api/v1/merchant-integration/prices
Request samples
Response samples
application/json
[
  • {
    }
]

Get Invoice URLs

Get Invoice URLs

SecuritybearerAuth
Request
query Parameters
type
string

Invoice type (FISCAL or NON_FISCAL)

Enum: "FISCAL" "NON_FISCAL"
Example: type=FISAL
dateFrom
required
string

Date from (ex 2022-05-17T23:59:00.1457765Z)

Example: dateFrom=2022-05-17T23:59:00.1457765Z
dateTo
required
string

Date to (ex 2022-05-17T23:59:00.1457765Z)

Example: dateTo=2022-05-17T23:59:00.1457765Z
suborderIds
required
string

Collection of suborder ids for which we issue fetching invoice document URLs.

Example: suborderIds=LSQNE-7ND5J-FBA-1
Responses
200

Successfully

400

Invalid request

404

Not found

500

Internal server error

get/order/api/v1/merchant-integration/invoices/urls
Request samples
Response samples
application/json
{
  • "suborderIdNumberValue": [
    ]
}

Get Invoice Corrections URLs

Get Invoice Corrections URLs

SecuritybearerAuth
Request
query Parameters
type
string

Invoice type (FISCAL or NON_FISCAL)

Enum: "FISCAL" "NON_FISCAL"
Example: type=FISAL
dateFrom
required
string

Date from (ex 2022-05-17T23:59:00.1457765Z)

Example: dateFrom=2022-05-17T23:59:00.1457765Z
dateTo
required
string

Date to (ex 2022-05-17T23:59:00.1457765Z)

Example: dateTo=2022-05-17T23:59:00.1457765Z
suborderIds
required
string

Collection of suborder ids for which we issue fetching invoice document URLs.

Example: suborderIds=LSQNE-7ND5J-FBA-1
Responses
200

Successfully

400

Invalid request

404

Not found

500

Internal server error

get/order/api/v1/merchant-integration/invoice-corrections/urls
Request samples
Response samples
application/json
{
  • "suborderIdNumberValue": [
    ]
}

Discounts

Schedule discounts in bulk

Schedule discounts in bulk

SecuritybearerAuth
Request
Request Body schema:
required

Optional description

Array of objects
Responses
200

Successfully

400

Invalid request

500

Internal server error

post/payment/api/v1/merchant-integration/discounts
Request samples
{
  • "discounts": [
    ]
}
Response samples
application/json
{
  • "scheduleResult": [
    ]
}

Update discounts in bulk

Update discounts in bulk

SecuritybearerAuth
Request
Request Body schema:
required

Optional description

Array of objects
Responses
200

Successfully

400

Invalid request

500

Internal server error

put/payment/api/v1/merchant-integration/discounts
Request samples
{
  • "discounts": [
    ]
}
Response samples
application/json
{
  • "updateResult": [
    ]
}

Get discount prices

Get discount prices

SecuritybearerAuth
Request
query Parameters
dateFrom
required
string

Start date interval (dd/MM/yyyy)

dateTo
required
string

End date interval (dd/MM/yyyy)

Responses
200

Successfully

400

Invalid request

500

Internal server error

get/payment/api/v1/merchant-integration/discounts
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

Cancel discount prices

Cancel discount prices

SecuritybearerAuth
Request
path Parameters
discountId
required
string

Discount id

Responses
200

Success

400

Invalid request

404

Not found

500

Internal server error

put/payment/api/v1/merchant-integration/discounts/{discountId}/cancellations
Request samples
Response samples
application/json
{
  • "message": "string"
}