Talk in Corporate
(Interactive) API documentation
Get a category
Displays entries for a selected category.
gethttps://talkincorporate.raissa-k.repl.co/api/:category
Permission necessary: none
Field | Type | Description |
---|---|---|
category | String |
Category name. Allowed values:general ,
lazy ,
demand ,
boundary ,
interview
|
Success response for "general" category:
{
"entries": [
{
"original": "That idea will never work.",
"corporate": "I am happy to explore this option but I do have some hesitations on the viability.",
"category": "general"
}
]
}
Error response
{
"warning": "Nothing found in this search"
}
Edit entry
Edits text and category of an entry.
patchhttps://talkincorporate.raissa-k.repl.co/api/:id
Permission necessary: none
Field | Type | Description |
---|---|---|
id | String | Entry id. |
Request Body
Field | Type | Description |
---|---|---|
original | String |
What you mean |
corporate | String |
Corporate version of what you mean Size range: |
category | String |
Category name Allowed values:
|
Success response:
{
"status": "Success",
"data": {
"editedEntry": {
"_id": "1234abcd0000aaaa00001234",
"original": "That idea will never work!",
"corporate": "I am happy to explore this option but I do have some hesitations on the viability.",
"category": "general"
}
}
}
Invalid ID
Status: 404 Not Found
{
"error": "Invalid ID"
}
Invalid value
Example: submitting "FUNNY" category
Status: 400 Bad Request
{
"errors": [
{
"value": "FUNNY",
"msg": "Invalid value",
"param": "category",
"location": "body"
}
]
}
Retrieve a random result
Displays a single random entry.
gethttps://talkincorporate.raissa-k.repl.co/api/random
Permission necessary: none
Success response example:
{
"entries": [
{
"original": "Does taking on all this extra work come with extra pay?",
"corporate": "With my role expanding is there a plan to review my title and compensation to better reflect these additional responsibilities?",
"category": "demand"
}
]
}
Search
Retrieve entries that match the query.
gethttps://talkincorporate.raissa-k.repl.co/api/search/:query
Permission necessary: none
Parameter
Field | Type | Description |
---|---|---|
query | String |
Query parameters. Example:
|
Success response for "gas+prices" search:
{
"entries": [
{
"original": "With these gas prices I am not driving to the office every day.",
"corporate": "Is there a cost of adjustment for gas price reinbursement?",
"category": "general"
},
{
"original": "With these gas prices I am not driving to the office every day.",
"corporate": "Moving forward will there be an expectation to be in the office more regularly?",
"category": "general"
}
]
}
Error-response
{
"warning": "Nothing found in this search"
}