Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 118 additions & 142 deletions src/content/docs/manage-your-account/your-data/exporting-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,152 +94,128 @@ At any time, the person who made the export request can cancel it by going to th

## What the exported data looks like

Data is exported in JSON format as separate user and business data files. If you have many records, there may be several JSON files in the batch.
Data is exported in NDJSON format, with separate data files for users and organizations.

Here’s what an exported record looks like.
Here’s an example of `users.ndjson`.

```json
{
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for user"
},
"external_id": {
"type": "string",
"description": "Imported external system id"
},
"first_name": {
"type": "string",
"description": "First name"
},
"last_name": {
"type": "string",
"description": "Last name"
},
"email": {
"type": "string",
"description": "Email address",
"format": "email"
},
"email_verified": {
"type": "boolean",
"default": false,
"description": "Indicates if the user has confirmed their email address"
},
"social_logins": {
"type": "object",
"description": "Social login ids",
"patternProperties": {
".*": {
"type": "string"
}
}
},
"business_code": {
"type": "string",
"description": "The business that the user belongs to"
},
"organizations": {
"type": "array",
"description": "Organization codes that the user belongs to",
"items": {
"type": "string"
}
},
"created_on": {
"type": "string",
"description": "Timestamp that the user was created"
}
"password": {
"type": "object",
"description": "Hashed password",
"properties": {
"password_hash": {
"type": "string",
"description": "Hashed password"
},
"hashing_algorithm": {
"type": "string",
"description": "Hashing algorithm"
},
"hashing_config": {
"type": "object",
"description": "Algorithm specific configuration"
},
}
}
}
}
},
"business": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Unique identifier for business"
},
"name": {
"type": "string",
"description": "Business name"
},
"industry": {
"type": "string",
"description": "Industry that the business belongs to"
},
"terms_url": {
"type": "string",
"description": "URL for business terms"
},
"privacy_url": {
"type": "string",
"description": "URL for business privacy policy"
},
"partner_code": {
"type": "string",
"description": "Partner code"
},
"primary_email": {
"type": "string",
"description": "Primary email address for business"
},
"primary_phone": {
"type": "string",
"description": "Primary phone number for business"
}
}
},
"organizations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"organization_code": {
"type": "string",
"description": "Unique identifier for business"
},
"name": {
"type": "string",
"description": "Organization name"
},
"created_on": {
"type": "string",
"description": "Timestamp that the organization was created"
},
"business_code": {
"type": "string",
"description": "Business code that the organization belongs to"
}
}
}
}
}
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the object"
},
"email": {
"type": ["string", "null"],
"format": "email",
"description": "Email address of the user"
},
"phone": {
"type": ["string", "null"],
"description": "Phone number of the user, if available"
},
"username": {
"type": ["string", "null"],
"description": "Username of the user, if available"
},
"last_name": {
"type": ["string", "null"],
"description": "Last name of the user, if available"
},
"created_on": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the user was created"
},
"first_name": {
"type": ["string", "null"],
"description": "First name of the user, if available"
},
"identities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of identity (e.g., email)"
},
"identity": {
"type": "string",
"description": "Identity value (e.g., email address)"
},
"provider": {
"type": ["string", "null"],
"description": "Provider associated with the identity, if any"
}
},
"required": ["type", "identity"]
},
"description": "List of identities associated with the user"
},
"external_id": {
"type": ["string", "null"],
"description": "External identifier for the user, if available"
},
"business_code": {
"type": "string",
"description": "Code representing the associated business"
},
"organizations": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of organizations the user belongs to"
},
"email_verified": {
"type": "boolean",
"description": "Indicates if the email address is verified"
},
"password": {
"type": "object",
"properties": {
"hashing_config": { "type": "object" },
"hashed_password": { "type": "string" },
"hashing_algorithm": { "type": ["string", "null"] }
},
"required": ["hashing_config", "hashed_password"]
}
},
"required": ["id", "email", "created_on", "identities", "business_code", "organizations", "email_verified"],
"additionalProperties": false
}
```

Here's an example of `organizations.ndjson`.

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the organization"
},
"created_on": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the organization was created"
},
"business_code": {
"type": "string",
"description": "Code representing the associated business"
},
"organization_code": {
"type": "string",
"description": "Code representing the organization"
}
},
"required": ["name", "created_on", "business_code", "organization_code"],
"additionalProperties": false
}
```

Expand Down
Loading