Pushing data to TARTLE
Once you have a valid access token you can use it in the Authorization
header to push data into the TARTLE DataVault of the user that authorized your
application. You will only be able to push data to the data packets you created from your OAuth application in your
developer settings.
Let's imagine you want to create a data packet with user detail information like email and height/weight. After creating a packet
for your OAuth Client as specified here, you can then make a POST
request to
our /api/v5/packets/<PACKET_ID>/sellers_packets/push
endpoint. The following example assumes your packet id is aJmB48qXT7NBj
.
Please note that the packet id is specified both in the url segment and in the request body. These must match.
Push data to a packet with id 'aJmB48qXT7NBj'
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer '$ACCESS_TOKEN'" \
-d '{
"id": "aJmB48qXT7NBj",
"payload": {
"name": "John Doe",
"email": "john.doe@example.com",
"height": "180",
"weight": "70"
}' \
https://source.tartle.co/api/v5/packets/aJmB48qXT7NBj/sellers_packets/push
}'
- Name
id
- Type
- string
- Description
The id of the packet you want to push data to.
- Name
payload
- Type
- object
- Description
The packet data you want to push.
Your payload data must be an object with all values of type string. Values can
also be undefined
or null
to save the question without an answer.
The response will be in this shape:
{
"message": "Data successfully synced",
"sellers_packet": {
"account_id": "<ACCOUNT_ID>",
"status": "published",
"updated_at": "2025-03-27T20:13:01.553Z",
"id": "<SELLERS_PACKET_ID>",
"packet_id": "<PACKET_ID>",
"created_at": "2025-03-24T17:49:50.483Z",
"beneficiary_account_id": null,
"autosell_setting": "enabled_for_any_price",
"first_published_at": "2025-03-24T17:49:50.483Z"
}
}
If there's an error authenticating your request, the error will be in the following format:
{
"error": "<error_code>",
"error_description": "<error_description>"
}
These type of errors follow the OAuth 2.0 specification for authentication errors.
And if there's any other type of error, like with data validation, the error will be in the following format:
{
"errors": { "base": ["<error_message>"] }
}
Token lifetime
Access tokens have a lifetime of 24 hours. Once your token has expired, you will need to refresh it.