Export

The export works similarly to searching. All the same filters and rules apply. Exporting SKUs can be done at POST /sku-export. See the full API reference here.

Export is paginated, allowing sequential extraction. The request takes a pageToken, which should be left out on the first request. Then the response contains a nextPageToken, that can be used in the next request to continue from where it left off. The nextPageToken is null when there are no more products or SKUs.

Example

The first request could look like this:

1
2
3
4
5
{
    "segmentId": "b2c-en-test",
    "scopeId": "browse",
    "numberOfResults": 1 // To simplify the output in the example.
}

Which then responds with:

{
    "skus": [
        {
        "product": {
            "id": "1000019100000",
            "alternativeIds": [],
            "productNumber": "none",
            "name": "Brædder fyr U/S 3-sidig knastfri 19x100 mm uimprægneret ~",
            "shortDescription": "",
            "longDescription": "",
            "media": [
            {
                "url": "https://mediacache.davidsen.as/v-637546845635031517/95/23/808b-503f-427b-a6f9-70f381ac6109/1000019100000_50_br%C3%A6dder%20fyr%20us%203-sidig%20knastfri%2019x125%20mm%20uimpr%C3%A6gneret%20~.jpg",
                "type": "Image",
                "metadata": ""
            }
            ],
            "metadata": null,
            "categories": []
        },
        "id": "10000191000360",
        "skuNo": "019100 0360",
        "ean": null,
        "name": "Brædder fyr U/S 3-sidig knastfri 19x100 mm x 3,6M ~",
        "metadata": null,
        "price": {
            "price": 1718,
            "listPrice": 1718
        },
        "stringAttribute": {},
        "numberAttributes": {},
        "intervalAttributes": {}
        }
    ],
    "total": 10000,
    "nextPageToken": "TVRBd01EQXhPVEV3TURBek5qQT18TVRBd01EQXhPVEV3TURBek5qQT18TVRBd01EQXhPVEV3TURBd01BPT0="
}

Given this nextPageToken, the next batch can be exported like so:

1
2
3
4
5
6
{
    "segmentId": "b2c-en-test",
    "scopeId": "browse",
    "numberOfResults": 1,
    "pageToken":  "TVRBd01EQXhPVEV3TURBek5qQT18TVRBd01EQXhPVEV3TURBek5qQT18TVRBd01EQXhPVEV3TURBd01BPT0="
}

Which returns:

{
    "skus": [
        {
        "product": {
            "id": "1000019100000",
            "alternativeIds": [],
            "productNumber": "none",
            "name": "Brædder fyr U/S 3-sidig knastfri 19x100 mm uimprægneret ~",
            "shortDescription": "",
            "longDescription": "",
            "media": [
            {
                "url": "https://mediacache.davidsen.as/v-637546845635031517/95/23/808b-503f-427b-a6f9-70f381ac6109/1000019100000_50_br%C3%A6dder%20fyr%20us%203-sidig%20knastfri%2019x125%20mm%20uimpr%C3%A6gneret%20~.jpg",
                "type": "Image",
                "metadata": ""
            }
            ],
            "metadata": null,
            "categories": []
        },
        "id": "10000191000450",
        "skuNo": "019100 0450",
        "ean": null,
        "name": "Brædder fyr U/S 3-sidig knastfri 19x100 mm x 4,5M ~",
        "metadata": null,
        "price": {
            "price": 1718,
            "listPrice": 1718
        },
        "stringAttribute": {},
        "numberAttributes": {},
        "intervalAttributes": {}
        }
    ],
    "total": 10000,
    "nextPageToken": "TVRBd01EQXhPVEV3TURBME5UQT18TVRBd01EQXhPVEV3TURBME5UQT18TVRBd01EQXhPVEV3TURBd01BPT0="
}