View entries Edit entries

Talk in Corporate

(Interactive) API documentation


Get a category

Displays entries for a selected category.

get
https://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.

patch
https://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: 5

category   String

Category name

Allowed values: general, lazy, demand, boundary, interview

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.

get
https://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"
                    }
                ]
            }