This is an overview of discoveries surrounding the Dirk app for Android & iOS.
Calls are made to app-api.dirk.nl
over https. It looks like this is version 2 of the API since first segment of the path is /v2
.
Funny enough a lot of the assets are loaded from app.dekamarkt.nl
.
Two custom headers are send with each request to app-api.dirk.nl
: x-api-id
and x-api-key
. The user-agent
header is usually okhttp/4.9.1
.
A list of stores can be requested from /stores
, the parameter formulaId
filters out stores: 1
is Dekamarkt and 2
is Dirk.
The response will be a json array of objects. Each object represents a store containing:
storeId
: a unique string of digitsstoreCode
: a unique string of digitsname
: usually the address of the store (street + nr)formula
: formula used in this store (seeformulaId
filter parameter), object containing:formulaId
: numerical stringname
: name of the formula
location
: coordinates of the store, object containinglatitude
&longitude
features
: an empty array
Details of a store can be requested from /stores/{storeId}
.
The response will be a json object containing:
storeId
: a unique string of digitsstoreCode
: a unique string of digitsname
: usually the address of the store (street + nr)formula
: formula used in this store (seeformulaId
filter parameter), object containing:formulaId
: numerical stringname
: name of the formula
address
: address of the store, object containing:streetAddress
postalCode
locality
location
: coordinates of the store, object containinglatitude
&longitude
contactInformation
: object containing:email
telephone
visit
features
: an array of feature stringsservices
an array of service objects, each object containingcode
andname
Opening hours of a store can be requested from /stores/{storeId}/openinghours
.
The response will be a json array of objects. Each object represents a time block containing:
openTime
: in1970-01-01T00:00:00
formatcloseTime
: in1970-01-01T00:00:00
formatemphasize
: usuallyfalse
Categories of temporary offers can be requested from /catalog/offers/categories
with some parameters:
storeId
: id of the store, mandatorystartDate
: in1970-01-01T00:00:00.000Z
formatendDate
: in1970-01-01T00:00:00.000Z
formatexcludeCategoryCode
: no effect when used, but17000000
seems to be a common value The response will be a json array of objects. Each object represents a category containing:code
: unique number like01000000
name
: name of the categoryicon
: filenamebackgroundImage
: path/filenamecategories
: a subdivision array of objects, each object containing:code
: unique number like01001000
name
: name of the subdivisioncategories
: subdivision of the subdivision array of objects, each object containing:code
: unique number like01001001
name
: name of the subdivision
Temporary offers can be requested from /catalog/offers
with some parameters:
storeId
: id of the store, mandatorystartDate
: in1970-01-01T00:00:00.000Z
formatendDate
: in1970-01-01T00:00:00.000Z
formatexcludeCategoryCode
: exclude offers with given category codecategoryCode
: only include offers with given category code The response will be a json array of objects. Each object represents an offer containing:offerId
: a unique string of digitstitle
: name of the product offereddescriptiveSize
imageUrl
: path/filenamediscountType
: unknownoriginalPrice
: numerical value in eurosdiscountPrice
: numerical value in eurospriceLabel
: textual representation of the offervalidFrom
: in1970-01-01T00:00:00
formatvalidUntil
: in1970-01-01T00:00:00
formatproducts
: an array of product objects containing:productId
: a unique string of digitssku
: a unique string of digitsname
: name of the productbrandName
: name of the brand of the productdescriptiveSize
imageUrl
: path/filenameavailability
: often"AVAILABLE"
restriction
: often"NONE"
tradeChannel
: often"ALL"
prices
: array of price objects containing:salePrice
: numerical value in eurosvalidFrom
: in1970-01-01T00:00:00
formatvalidUntil
: in1970-01-01T00:00:00
formatpriceLabel
: textual representation of the offer
certifications
(only if applicable)packaging
categories
: array of categories this offer is used in
Categories of products can be requested from /catalog/products/categories
with some parameters:
storeId
: id of the store, mandatorypriceDate
: in1970-01-01T00:00:00.000Z
format The response will be a json array of objects. Each object represents a category containing:code
: unique number like01000000
name
: name of the categoryicon
: filenamebackgroundImage
: path/filenamecategories
: a subdivision array of objects, each object containing:code
: unique number like01001000
name
: name of the subdivisioncategories
: subdivision of the subdivision array of objects, each object containing:code
: unique number like01001001
name
: name of the subdivision
Products can be requested from /catalog/products
with some parameters:
storeId
: id of the store, mandatorypriceDate
: in1970-01-01T00:00:00.000Z
format The response will be a json array of objects. Each object represents an offer containing:productId
: a unique string of digitssku
: a unique string of digitsname
: name of the productbrandName
: name of the brand of the productvariantDescription
: if applicable; for products with multiple variationsdescriptiveSize
imageUrl
: path/filenamerestriction
: often"NONE"
prices
: array of price objects containing:salePrice
: numerical value in eurosvalidFrom
: in1970-01-01T00:00:00
formatvalidUntil
: in1970-01-01T00:00:00
format
certifications
(only if applicable)packaging
: object containing:itemCount
: seems to be always1
customizable
: seems to be alwaysfalse
categories
: array of categories this offer is used in
More may follow