Workplace

Workplaces are a part of an organization. It could be an office, a store, a department etc. Organization users may assign a culture to a workplace to get a culture match.

Workplaces are not shared between API clients. An organization user may delete workplaces in their control panel.

Show all

Display all workplaces.

Request

GET /api/workplaces
Host:          api.happyrmatch.com
Authorization: Bearer eyJ0eXAi1QiLCJ...
Accept:        application/vnd.api+json
        

Response

HTTP/1.0 200 OK
Cache-Control: no-cache, private
Content-Type:  application/vnd.api+json
Date:          Wed, 13 Oct 2021 04:26:34 GMT

{
    "data": {
        "type": "workplace",
        "id": "ac1e9654-bbaa-4ffe-8781-c0e342b93e43",
        "attributes": {
            "organization": "5b0a13b6-d6e3-4841-9a13-d152f61d474a",
            "name": "Adams-Reichel",
            "country": "SE",
            "region": "Stockholms l\u00e4n",
            "city": "Stockholm",
            "address": "Drottninggatan 75"
        }
    }
}

Show

Display a workplace.

Request

GET /api/workplaces/[workplace_id]
Host:          api.happyrmatch.com
Authorization: Bearer eyJ0eXAi1QiLCJ...
Accept:        application/vnd.api+json
Content-Type:  application/vnd.api+json
        

Response

HTTP/1.0 200 OK
Cache-Control: no-cache, private
Content-Type:  application/vnd.api+json
Date:          Wed, 13 Oct 2021 04:26:34 GMT

{
    "data": {
        "type": "workplace",
        "id": "ac1e9654-bbaa-4ffe-8781-c0e342b93e43",
        "attributes": {
            "organization": "5b0a13b6-d6e3-4841-9a13-d152f61d474a",
            "name": "Adams-Reichel",
            "country": "SE",
            "region": "Stockholms l\u00e4n",
            "city": "Stockholm",
            "address": "Drottninggatan 75"
        }
    }
}

Create

Create a new workplace

Request

POST /api/workplaces
Host:          api.happyrmatch.com
Authorization: Bearer eyJ0eXAi1QiLCJ...
Accept:        application/vnd.api+json
Content-Type:  application/vnd.api+json

{
    "name": "My workplace",
    "country": "SE",
    "region": "Stockholms l\u00e4n",
    "city": "Stockholm",
    "address": "Drottninggatan 75"
}

Parameters

NameDescription
nameThe name of the workplace.
countryAlpha-2 code for the country described by ISO 3166.
regionA state, county or other region that are covering a larger area than the city.
cityThe name of the city.
addressThe street address and number.

Response

HTTP/1.0 201 Created
Cache-Control: no-cache, private
Content-Type:  application/vnd.api+json
Date:          Wed, 13 Oct 2021 04:26:34 GMT

{
    "data": {
        "type": "workplace",
        "id": "ac1e9654-bbaa-4ffe-8781-c0e342b93e43",
        "attributes": {
            "organization": "5b0a13b6-d6e3-4841-9a13-d152f61d474a",
            "name": "Adams-Reichel",
            "country": "SE",
            "region": "Stockholms l\u00e4n",
            "city": "Stockholm",
            "address": "Drottninggatan 75"
        }
    }
}

Update

Update an existing workplace.

Request

PUT /api/workplaces/[workplace_id]
Host:          api.happyrmatch.com
Authorization: Bearer eyJ0eXAi1QiLCJ...
Accept:        application/vnd.api+json
Content-Type:  application/vnd.api+json

{
    "name": "My workplace",
    "country": "SE",
    "region": "Stockholms l\u00e4n",
    "city": "Stockholm",
    "address": "Drottninggatan 75"
}

Parameters

The parameters are the same as for creating a workplace.

Response

HTTP/1.0 200 OK
Cache-Control: no-cache, private
Content-Type:  application/vnd.api+json
Date:          Wed, 13 Oct 2021 04:26:34 GMT

{
    "data": {
        "type": "workplace",
        "id": "ac1e9654-bbaa-4ffe-8781-c0e342b93e43",
        "attributes": {
            "organization": "5b0a13b6-d6e3-4841-9a13-d152f61d474a",
            "name": "Adams-Reichel",
            "country": "SE",
            "region": "Stockholms l\u00e4n",
            "city": "Stockholm",
            "address": "Drottninggatan 75"
        }
    }
}

Delete

Delete a workplace.

Request

DELETE /api/workplaces/[workplace_id]
Host:          api.happyrmatch.com
Authorization: Bearer eyJ0eXAi1QiLCJ...
Accept:        application/vnd.api+json

Response

HTTP/1.0 204 No Content
Cache-Control: no-cache, private
Date:          Wed, 13 Oct 2021 04:26:34 GMT