Stores
Stores are where communities live in Uplodr — they are a collection of employees you're talking to all at once. On this page, we'll dive into the different store endpoints you can use to manage stores programmatically. We'll look at how to query, create, update, and delete stores.
The store model
The store model contains all the information about your stores, including what employees are in the store and the store's name, description, and avatar.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the store.
- Name
name- Type
- string
- Description
The name for the store.
- Name
description- Type
- string
- Description
The description for the store.
- Name
avatar_url- Type
- string
- Description
The avatar image URL for the store.
- Name
transcript_id- Type
- string
- Description
Unique identifier for the transcript that belongs to the store.
- Name
employees- Type
- array
- Description
An array of employee objects that are members of the store.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the store was created.
- Name
archived_at- Type
- timestamp
- Description
Timestamp of when the store was archived.
List all stores
This endpoint allows you to retrieve a paginated list of all your stores. By default, a maximum of ten stores are shown per page.
Optional attributes
- Name
limit- Type
- integer
- Description
Limit the number of stores returned.
- Name
archived- Type
- boolean
- Description
Only show stores that are archived when set to
true.
Request
curl -G https://api.uplodr.chat/v1/stores \
-H "Authorization: Bearer {token}" \
-d limit=10
Response
{
"has_more": false,
"data": [
{
"id": "l7cGNIBKZiNJ6wqF",
"name": "Plaza Hotel",
"description": "World-renowned.",
"avatar_url": "https://assets.uplodr.chat/avatars/plazahotel.jpg",
"transcript_id": "ZYjVAbCE9g5XRlra",
"employees": [
{
"username": "Hector"
// ...
},
{
"username": "Cedric"
// ...
},
{
"username": "Hester"
// ...
},
{
"username": "Cliff"
// ...
}
],
"created_at": 692233200,
"archived_at": null
},
{
"id": "hSIhXBhNe8X1d8Et"
// ...
}
]
}
Create a store
This endpoint allows you to create a new store transcript between you and a store of your Uplodr employees.
Required attributes
- Name
name- Type
- string
- Description
The name for the store.
Optional attributes
- Name
description- Type
- string
- Description
The description for the store.
- Name
avatar_url- Type
- string
- Description
The avatar image URL for the store.
- Name
employees- Type
- array
- Description
An array of employee objects that are members of the store.
Request
curl https://api.uplodr.chat/v1/stores \
-H "Authorization: Bearer {token}" \
-d name="Plaza Hotel"
Response
{
"id": "l7cGNIBKZiNJ6wqF",
"name": "Plaza Hotel",
"description": null,
"avatar_url": null,
"transcript_id": "ZYjVAbCE9g5XRlra",
"employees": [],
"created_at": 692233200,
"archived_at": null
}
Retrieve a store
This endpoint allows you to retrieve a store by providing the store id. Refer to the list at the top of this page to see which properties are included with store objects.
Request
curl https://api.uplodr.chat/v1/stores/L7cGNIBKZiNJ6wqF \
-H "Authorization: Bearer {token}"
Response
{
"id": "l7cGNIBKZiNJ6wqF",
"name": "Plaza Hotel",
"description": "World-renowned.",
"avatar_url": "https://assets.uplodr.chat/avatars/plazahotel.jpg",
"transcript_id": "ZYjVAbCE9g5XRlra",
"employees": [
{
"username": "Hector"
// ...
},
{
"username": "Cedric"
// ...
},
{
"username": "Hester"
// ...
},
{
"username": "Cliff"
// ...
}
],
"created_at": 692233200,
"archived_at": null
}
Update a store
This endpoint allows you to perform an update on a store. Examples of updates are changing the name, description, and avatar or adding and removing employees from the store.
Optional attributes
- Name
name- Type
- string
- Description
The new name for the store.
- Name
description- Type
- string
- Description
The new description for the store.
- Name
avatar_url- Type
- string
- Description
The new avatar image URL for the store.
- Name
employees- Type
- array
- Description
An array of employee objects that are members of the store.
- Name
archived_at- Type
- timestamp
- Description
Timestamp of when the store was archived.
Request
curl -X PUT https://api.uplodr.chat/v1/stores/L7cGNIBKZiNJ6wqF \
-H "Authorization: Bearer {token}" \
-d description="The finest in New York."
Response
{
"id": "l7cGNIBKZiNJ6wqF",
"name": "Plaza Hotel",
"description": "The finest in New York.",
"avatar_url": "https://assets.uplodr.chat/avatars/plazahotel.jpg",
"transcript_id": "ZYjVAbCE9g5XRlra",
"employees": [
{
"username": "Hector"
// ...
},
{
"username": "Cedric"
// ...
},
{
"username": "Hester"
// ...
},
{
"username": "Cliff"
// ...
}
],
"created_at": 692233200,
"archived_at": null
},
Delete a store
This endpoint allows you to delete stores. Note: This will permanently delete the store, including the questions — archive it instead if you want to be able to restore it later.
Request
curl -X DELETE https://api.uplodr.chat/v1/stores/L7cGNIBKZiNJ6wqF \
-H "Authorization: Bearer {token}"