API documentation

Occupations

Overview

The Occupation object represents a job a Contact has (or had). It is linked with a occupation object.

List all the occupations in your account

GET /occupations/

Parameters

Name Type Description
limit integer Indicates the page size.
page integer Indicates the page to return.

Response

{
  "data": [
    {
      "id": 2,
      "object": "occupation",
      "title": "Waiter",
      "description": "Served beverages",
      "salary": 12000,
      "salary_unit": "year",
      "currently_works_here": false,
      "start_date": null,
      "end_date": null,
      "company": {
        "id": 1,
        "object": "company",
        "name": "Central Perk",
        "website": "http:\/\/url.com",
        "number_of_employees": 3,
        "account": {
          "id": 1
        },
        "created_at": "2019-01-02T14:44:30Z",
        "updated_at": "2019-01-02T14:47:07Z"
      },
      "account": {
        "id": 1
      },
      "contact": {
        "id": 1,
        "object": "contact",
        "hash_id": "h:Y5LOkAdWNDqgVomKPv",
        "first_name": "Misael",
        "last_name": null,
        "nickname": null,
        "complete_name": "Misael",
        "initials": "M",
        "gender": "Man",
        "is_partial": false,
        "is_dead": false,
        "information": {
          "birthdate": {
            "is_age_based": null,
            "is_year_unknown": null,
            "date": null
          },
          "deceased_date": {
            "is_age_based": null,
            "is_year_unknown": null,
            "date": null
          },
          "avatar": {
            "has_avatar": true,
            "avatar_url": "https:\/\/randomuser.me\/api\/portraits\/women\/55.jpg",
            "default_avatar_color": "#e5e5cd"
          }
        },
        "account": {
          "id": 1
        }
      },
      "created_at": "2019-01-02T15:04:54Z",
      "updated_at": "2019-01-02T15:04:54Z"
    },
    {
      "id": 3,
      "object": "occupation",
      "title": "Waiter",
      "description": "Served beverages",
      "salary": 12000,
      "salary_unit": "year",
      "currently_works_here": false,
      "start_date": "1990-01-01",
      "end_date": "1994-02-02",
      "company": {
        "id": 1,
        "object": "company",
        "name": "Central Perk",
        "website": "http:\/\/url.com",
        "number_of_employees": 3,
        "account": {
          "id": 1
        },
        "created_at": "2019-01-02T14:44:30Z",
        "updated_at": "2019-01-02T14:47:07Z"
      },
      "account": {
        "id": 1
      },
      "contact": {
        "id": 1,
        "object": "contact",
        "hash_id": "h:Y5LOkAdWNDqgVomKPv",
        "first_name": "Misael",
        "last_name": null,
        "nickname": null,
        "complete_name": "Misael",
        "initials": "M",
        "gender": "Man",
        "is_partial": false,
        "is_dead": false,
        "information": {
          "birthdate": {
            "is_age_based": null,
            "is_year_unknown": null,
            "date": null
          },
          "deceased_date": {
            "is_age_based": null,
            "is_year_unknown": null,
            "date": null
          },
          "avatar": {
            "has_avatar": true,
            "avatar_url": "https:\/\/randomuser.me\/api\/portraits\/women\/55.jpg",
            "default_avatar_color": "#e5e5cd"
          }
        },
        "account": {
          "id": 1
        }
      },
      "created_at": "2019-01-02T15:07:03Z",
      "updated_at": "2019-01-02T15:07:03Z"
    }
  ],
  "links": {
    "first": "https:\/\/app.monicahq.com\/api\/occupations?page=1",
    "last": "https:\/\/app.monicahq.com\/api\/occupations?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https:\/\/app.monicahq.com\/api\/occupations",
    "per_page": 15,
    "to": 2,
    "total": 2
  }
}

Get a specific occupation

GET /occupations/:id

Response

{
{
  "data": {
    "id": 2,
    "object": "occupation",
    "title": "Waiter",
    "description": "Served beverages",
    "salary": 12000,
    "salary_unit": "year",
    "currently_works_here": false,
    "start_date": null,
    "end_date": null,
    "company": {
      "id": 1,
      "object": "company",
      "name": "Central Perk",
      "website": "http:\/\/url.com",
      "number_of_employees": 3,
      "account": {
        "id": 1
      },
      "created_at": "2019-01-02T14:44:30Z",
      "updated_at": "2019-01-02T14:47:07Z"
    },
    "account": {
      "id": 1
    },
    "contact": {
      "id": 1,
      "object": "contact",
      "hash_id": "h:Y5LOkAdWNDqgVomKPv",
      "first_name": "Misael",
      "last_name": null,
      "nickname": null,
      "complete_name": "Misael",
      "initials": "M",
      "gender": "Man",
      "is_partial": false,
      "is_dead": false,
      "information": {
        "birthdate": {
          "is_age_based": null,
          "is_year_unknown": null,
          "date": null
        },
        "deceased_date": {
          "is_age_based": null,
          "is_year_unknown": null,
          "date": null
        },
        "avatar": {
          "has_avatar": true,
          "avatar_url": "https:\/\/randomuser.me\/api\/portraits\/women\/55.jpg",
          "default_avatar_color": "#e5e5cd"
        }
      },
      "account": {
        "id": 1
      }
    },
    "created_at": "2019-01-02T15:04:54Z",
    "updated_at": "2019-01-02T15:04:54Z"
  }
}

Create an occupation

POST /occupations/

Input

Name Type Description
contact_id integer Required. The contact this occupation is about.
company_id integer Required. The company where this occupation took place.
title string Required. The job title. Max 255 characters.
description string Any additional description about this job. Max 1000 characters.
salary integer The estimated salary of the contact for this job.
salary_unit string The unit of the salary (ie. $12000/year). Possible values: year, month, week, day, hour.
currently_works_here boolean Indicates whether the contact currently works here.
start_date date The date the job started. Format: YYYY-MM-DD.
end_date date The date the job ended. Format: YYYY-MM-DD.

Example

{
    "contact_id": 1,
    "company_id": 1,
    "title": "Waiter",
    "description": "Served beverages",
    "salary": "12000",
    "salary_unit": "year",
    "currently_works_here": false,
    "start_date": "1990-01-01",
    "end_date": "1994-02-02"
}

Response

The API call returns a occupation object if the call succeeds.

{
  "data": {
    "id": 3,
    "object": "occupation",
    "title": "Waiter",
    "description": "Served beverages",
    "salary": "12000",
    "salary_unit": "year",
    "currently_works_here": false,
    "start_date": "1990-01-01T00:00:00Z",
    "end_date": "1994-02-02T00:00:00Z",
    "company": {
      "id": 1,
      "object": "company",
      "name": "Central Perk",
      "website": "http:\/\/url.com",
      "number_of_employees": 3,
      "account": {
        "id": 1
      },
      "created_at": "2019-01-02T14:44:30Z",
      "updated_at": "2019-01-02T14:47:07Z"
    },
    "account": {
      "id": 1
    },
    "contact": {
      "id": 1,
      "object": "contact",
      "hash_id": "h:Y5LOkAdWNDqgVomKPv",
      "first_name": "Misael",
      "last_name": null,
      "nickname": null,
      "complete_name": "Misael",
      "initials": "M",
      "gender": "Man",
      "is_partial": false,
      "is_dead": false,
      "information": {
        "birthdate": {
          "is_age_based": null,
          "is_year_unknown": null,
          "date": null
        },
        "deceased_date": {
          "is_age_based": null,
          "is_year_unknown": null,
          "date": null
        },
        "avatar": {
          "has_avatar": true,
          "avatar_url": "https:\/\/randomuser.me\/api\/portraits\/women\/55.jpg",
          "default_avatar_color": "#e5e5cd"
        }
      },
      "account": {
        "id": 1
      }
    },
    "created_at": "2019-01-02T15:07:03Z",
    "updated_at": "2019-01-02T15:07:03Z"
  }
}

Update an occupation

PUT /occupations/:id

Input

Name Type Description
contact_id integer Required. The contact this occupation is about.
company_id integer Required. The company where this occupation took place.
title string Required. The job title. Max 255 characters.
description string Any additional description about this job. Max 1000 characters.
salary integer The estimated salary of the contact for this job.
salary_unit string The unit of the salary (ie. $12000/year). Possible values: year, month, week, day, hour.
currently_works_here boolean Indicates whether the contact currently works here.
start_date date The date the job started. Format: YYYY-MM-DD.
end_date date The date the job ended. Format: YYYY-MM-DD.

Example

{
    "contact_id": 1,
    "company_id": 1,
    "title": "Waiter",
    "description": "Served beverages",
    "salary": "12000",
    "salary_unit": "year",
    "currently_works_here": false,
    "start_date": "1990-01-01",
    "end_date": "1994-02-02"
}

Response

{
  "data": {
    "id": 1,
    "object": "occupation",
    "title": "Waiter",
    "description": "Served beverages",
    "salary": "12000",
    "salary_unit": "year",
    "currently_works_here": false,
    "start_date": "1990-01-01T00:00:00Z",
    "end_date": "1994-02-02T00:00:00Z",
    "company": {
      "id": 1,
      "object": "company",
      "name": "Central Perk",
      "website": "http:\/\/url.com",
      "number_of_employees": 3,
      "account": {
        "id": 1
      },
      "created_at": "2019-01-02T14:44:30Z",
      "updated_at": "2019-01-02T14:47:07Z"
    },
    "account": {
      "id": 1
    },
    "contact": {
      "id": 1,
      "object": "contact",
      "hash_id": "h:Y5LOkAdWNDqgVomKPv",
      "first_name": "Misael",
      "last_name": null,
      "nickname": null,
      "complete_name": "Misael",
      "initials": "M",
      "gender": "Man",
      "is_partial": false,
      "is_dead": false,
      "information": {
        "birthdate": {
          "is_age_based": null,
          "is_year_unknown": null,
          "date": null
        },
        "deceased_date": {
          "is_age_based": null,
          "is_year_unknown": null,
          "date": null
        },
        "avatar": {
          "has_avatar": true,
          "avatar_url": "https:\/\/randomuser.me\/api\/portraits\/women\/55.jpg",
          "default_avatar_color": "#e5e5cd"
        }
      },
      "account": {
        "id": 1
      }
    },
    "created_at": "2019-01-02T15:03:27Z",
    "updated_at": "2019-01-02T15:10:53Z"
  }
}

Delete an occupation

DELETE /occupations/:id

Response

The response sends back the id that was just deleted.

{
  "deleted": true,
  "id": 1
}

Company

© Copyright 2024 75if Ltd.
All rights reserved.