Link Search Menu Expand Document

Exporting users (bulk)

curl "-XPOST -v -k \
-H 'X-MyPrice-App-Hostname: retailername.spaaza.com’ \
-H 'Authorization: Bearer <your key>:<your secret>’ \
-d 'export_entity=user’
'https://api0.spaaza.com/auth/export'"

That API end-point will respond with a download link for the CSV file. The link can only be used once and is time limited (currently 48 hours).

[
{
    "result": {
        "code": 1,
        "status": "ok"
    },
    "results": {
        "download_url": "https://services.spaaza.com/export/user?Nonce=2018-03-11T16%3A37%3A21ZAxagGQ9ZmaWBVyFLQZdYsCPWxcmlXoGSWzhCjqKaChA%3D&ChainId=1748&Segment=all",
        "result_type": "spaaza\\api\\auth\\export"
    }
}
]

POST to the API with the post data form encoded and the appropriate headers to specify the app hostname and your credentials.

You can make a GET request to the download link to get the CSV. The link contains a nonce which is signed with a secret known by our API and the download service.

At the moment the download service streams the CSV file over HTTP and it will contain all of the users. A future version will allow you to name a segment of users from the console.