Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v72
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
    • Import profile
    • Update profile
    • Import multiple profiles
    • Update multiple profiles
    • Add multiple profiles
    • Add profile to database
    • Quick profile import
    • Import profile to RabbitMQ
    • Get profile data
    • Uploading profiles to a file
    • Suspend all database profiles
    • Unsuspend all profiles in a database
    • Delete profile
    • Subscription fields functional update
    • Database fields functional update
    • Merging multiple profiles
    • Unsubscribe profile from resource
    • Profile splitting
    • Subscriptions
    • Action history
    • Profile relations
    • Get data for multiple profiles
  • Databases
  • Resources
  • Segments
  • Static segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Automation scenarios
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDevv71
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
This is documentation for Altcraft Platform v72. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Profiles
  • Uploading profiles to a file
Documentation for version v72

Uploading profiles to a file

Description​

Retrieves information about all database or segment profiles.

Contains 3 requests.

Step 1. Creating profiles export task​

Request URL​

Method: POST

https://example.com/api/v1.1/profiles/get_all

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPItoken
source_typestring"database"
"segment"
YesData source type
source_idint1YesData source ID
file_formatstring"csv"NoExport file format.
By default - csv
custom_requestJSON object{"occupation":"doctor"}NoProfile fields for search
filtering

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"source_type": "database",
"source_id": 1,
"file_format": "csv"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<source_type>database</source_type>
<source_id>1</source_id>
<file_format>csv</file_format>
</xml>

Response example​

  • JSON
  • XML
{
"data": {
"task_id": "task_b2f9fd6a-2499-4a63-b592-f15d4e3b69c5"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<task_id>task_b2f9fd6a-2499-4a63-b592-f15d4e3b69c5</task_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
task_idstringExport task ID
errorintError code
error_textstringError text

Step 2. Task status check​

Request URL​

Method: POST

https://example.com/api/v1.1/tasks/status

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
task_idstring"task_b2f9fk6a-2479-4a63-b592-f15d4e3b69c5"YesExport task ID

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"task_id": "ecd371a8-2229-48bb-bc3e-de7d39cd3051"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<task_id>ecd371a8-2229-48bb-bc3e-de7d39cd3051</task_id>
</xml>

Response example​

  • JSON
  • XML
{
"data": {
"status": "completed",
"progress": 100,
"result": {
"errors": [],
"source_id": 1,
"total": 1343,
"type": "database",
"urls": [
"/api/download/data/4cf435e8-9921-4666-a39e-03ecbf57527e/1_database_export.csv"
]
}
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<progress>100</progress>
<result>
<errors/>
<source_id>1</source_id>
<total>1343</total>
<type>database</type>
<urls>/api/download/data/4cf435e8-9921-4666-a39e-03ecbf57527e/1_database_export.csv</urls>
</result>
<status>completed</status>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
statusstringTask status
progressintTask progress
totalintNumber of profiles
urlsarrayExport file link
errorintError code
error_textstringError text

Step 3. Downloading result file​

The link to download the file looks like following:

https://example.com/api/download/6b248de2-33b9-4715-9720-5f7e23f4a296/1_database_export.csv?token=abcdefghijklmnqrstuvwxyz, where:

  • https://example.com - link to the platform panel
  • api/download/6b248de2-33b9-4715-9720-5f7e23f4a296/1_database_export.csv - link from the urls parameter of the past request
  • ?token=abcdefghijklmnqrstuvwxyz - user's API token (after the equal sign).

To download a file with profiles you should either open this link in your browser or send an empty GET request specifying this link in the URL.

Last updated on Mar 12, 2024
Previous
Get profile data
Next
Suspend all database profiles
  • Description
  • Step 1. Creating profiles export task
    • Request URL
    • Request parameters
    • Request example
    • Response example
    • Response parameters
  • Step 2. Task status check
    • Request URL
    • Request parameters
    • Request example
    • Response example
    • Response parameters
  • Step 3. Downloading result file
© 2015 - 2025 Altcraft, LLC. All rights reserved.