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. Leave out nextPageToken on the first request. The response then contains a nextPageToken, which you send in the next request to continue from where the previous one left off. When nextPageToken is null, there are no more SKUs.

A page can contain fewer SKUs than the requested numberOfResults, and some pages contain none at all. Keep paging until nextPageToken is null.

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
        },
        "stringAttributes": {},
        "numberAttributes": {},
        "intervalAttributes": {}
        }
    ],
    "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,
    "nextPageToken": "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
        },
        "stringAttributes": {},
        "numberAttributes": {},
        "intervalAttributes": {}
        }
    ],
    "nextPageToken": "TVRBd01EQXhPVEV3TURBME5UQT18TVRBd01EQXhPVEV3TURBME5UQT18TVRBd01EQXhPVEV3TURBd01BPT0="
}