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 (seeformulaIdfilter parameter), object containing:formulaId: numerical stringname: name of the formula
location: coordinates of the store, object containinglatitude&longitudefeatures: 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 (seeformulaIdfilter parameter), object containing:formulaId: numerical stringname: name of the formula
address: address of the store, object containing:streetAddresspostalCodelocality
location: coordinates of the store, object containinglatitude&longitudecontactInformation: object containing:emailtelephonevisit
features: an array of feature stringsservicesan array of service objects, each object containingcodeandname
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:00formatcloseTime: in1970-01-01T00:00:00formatemphasize: 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.000ZformatendDate: in1970-01-01T00:00:00.000ZformatexcludeCategoryCode: no effect when used, but17000000seems to be a common value The response will be a json array of objects. Each object represents a category containing:code: unique number like01000000name: name of the categoryicon: filenamebackgroundImage: path/filenamecategories: a subdivision array of objects, each object containing:code: unique number like01001000name: name of the subdivisioncategories: subdivision of the subdivision array of objects, each object containing:code: unique number like01001001name: 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.000ZformatendDate: in1970-01-01T00:00:00.000ZformatexcludeCategoryCode: 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 offereddescriptiveSizeimageUrl: path/filenamediscountType: unknownoriginalPrice: numerical value in eurosdiscountPrice: numerical value in eurospriceLabel: textual representation of the offervalidFrom: in1970-01-01T00:00:00formatvalidUntil: in1970-01-01T00:00:00formatproducts: 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 productdescriptiveSizeimageUrl: 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:00formatvalidUntil: in1970-01-01T00:00:00formatpriceLabel: 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.000Zformat The response will be a json array of objects. Each object represents a category containing:code: unique number like01000000name: name of the categoryicon: filenamebackgroundImage: path/filenamecategories: a subdivision array of objects, each object containing:code: unique number like01001000name: name of the subdivisioncategories: subdivision of the subdivision array of objects, each object containing:code: unique number like01001001name: 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.000Zformat 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 variationsdescriptiveSizeimageUrl: path/filenamerestriction: often"NONE"prices: array of price objects containing:salePrice: numerical value in eurosvalidFrom: in1970-01-01T00:00:00formatvalidUntil: in1970-01-01T00:00:00format
certifications(only if applicable)packaging: object containing:itemCount: seems to be always1customizable: seems to be alwaysfalse
categories: array of categories this offer is used in
More may follow