API Documentation

API Endpoint

Salaries

Salaries

Supported filter params

  • person_id (array)

  • after

  • before

GET /api/v2/salaries
Requestsreturns salaries

GET  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "21",
      "type": "salaries",
      "attributes": {
        "working_days": [],
        "working_hours": [
          8,
          8,
          8,
          8,
          8,
          0,
          0
        ],
        "salary_type_id": 2,
        "started_on": "2019-08-11",
        "ended_on": "2020-07-11",
        "hours": "8.0",
        "overhead": true,
        "note": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "hourly_rate": 2000,
        "hourly_rate_default": 2500,
        "hourly_rate_normalized": 2000,
        "monthly_cost": 320000,
        "monthly_cost_default": 400000,
        "monthly_cost_normalized": 320000,
        "cost": 2000,
        "cost_default": 2500,
        "cost_normalized": 2000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 554
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "1295"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "1295",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1253@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:27.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:27.989+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 554
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1741"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1741",
      "type": "companies",
      "attributes": {
        "name": "Client1188",
        "default_currency": null,
        "created_at": "2020-08-11T01:05:27.985+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 554
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/salaries?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/api/v2/salaries?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get salaries
GET/api/v2/salaries


GET /api/v2/salaries/1
Requestsreturns salary

GET  /api/v2/salaries/22

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "22",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-08-11",
      "ended_on": "2020-07-11",
      "hours": "8.0",
      "overhead": true,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000,
      "monthly_cost": 320000,
      "monthly_cost_default": 400000,
      "monthly_cost_normalized": 320000,
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 555
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1297"
        }
      }
    }
  },
  "included": [
    {
      "id": "1297",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1255@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:28.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:28.179+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 555
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1743"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1743",
      "type": "companies",
      "attributes": {
        "name": "Client1189",
        "default_currency": null,
        "created_at": "2020-08-11T01:05:28.176+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 555
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Gets a salary
GET/api/v2/salaries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

salary id


POST /api/v2/salaries
Requestscreates salarycreates salarycreates salaryreturns errordoes not create salarycreates salary with overhead: falsecreates salary

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "started_on": "2020-08-11",
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "hourly_rate": 2000,
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ]
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1299"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "24",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2020-08-11",
      "ended_on": null,
      "hours": "8.0",
      "overhead": true,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000,
      "monthly_cost": 320000,
      "monthly_cost_default": 400000,
      "monthly_cost_normalized": 320000,
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 556
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1299"
        }
      }
    }
  },
  "included": [
    {
      "id": "1299",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1257@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:28.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:28.333+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 556
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1745"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1745",
      "type": "companies",
      "attributes": {
        "name": "Client1190",
        "default_currency": null,
        "created_at": "2020-08-11T01:05:28.329+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 556
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "hourly_rate": 2000,
      "overhead": false
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1301"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "25",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-08-11",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000,
      "monthly_cost": 320000,
      "monthly_cost_default": 400000,
      "monthly_cost_normalized": 320000,
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 557
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1301"
        }
      }
    }
  },
  "included": [
    {
      "id": "1301",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person723@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:28.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:28.574+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 557
          }
        },
        "company": {
          "data": null
        },
        "subsidiary": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 1
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "hourly_rate": 2000,
      "overhead": false
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1303"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "26",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-08-11",
      "ended_on": null,
      "hours": "8.0"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 558
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1303"
        }
      }
    }
  },
  "included": [
    {
      "id": "1303",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person725@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:28.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:28.800+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 558
          }
        },
        "company": {
          "data": null
        },
        "subsidiary": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 1
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {},
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1305"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "must contain exactly 7 numbers",
      "source": {
        "pointer": "data/attributes/working_hours"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/salary_type"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/started_on"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/currency"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not an valid currency",
      "source": {
        "pointer": "data/attributes/currency"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/cost"
      }
    }
  ]
}

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "started_on": "2020-08-11",
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "hourly_rate": 2000,
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ]
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1307"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "source": {
        "pointer": "data/attributes/person"
      }
    }
  ]
}

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "salary_type_id": 2,
      "currency": "EUR",
      "hourly_rate": 2000,
      "hours": 8,
      "overhead": true
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1309"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "28",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-08-11",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000,
      "monthly_cost": 320000,
      "monthly_cost_default": 400000,
      "monthly_cost_normalized": 320000,
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 561
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1309"
        }
      }
    }
  },
  "included": [
    {
      "id": "1309",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person728@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:29.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:29.299+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 561
          }
        },
        "company": {
          "data": null
        },
        "subsidiary": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 1
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/salaries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "hourly_rate": 2000,
      "overhead": false
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1311"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "source": {
        "pointer": "data/attributes/person"
      }
    }
  ]
}

Create a salary
POST/api/v2/salaries

URI Parameters
HideShow
salary_type_id
number (required) Example: 1

salary type id

started_on
date (required) Example: 2018-01-01

started on

currency
string (required) Example: EUR

currency

hours
number (required) Example: 8

hours


PATCH /api/v2/salaries/1
Requestsreturns errordoes not update overheaddoes not change attributes

PATCH  /api/v2/salaries/31

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "hourly_rate": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/hourly_rate"
      }
    }
  ]
}

PATCH  /api/v2/salaries/33

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "overhead": true
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1321"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "33",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-08-11",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000,
      "monthly_cost": 320000,
      "monthly_cost_default": 400000,
      "monthly_cost_normalized": 320000,
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 567
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1321"
        }
      }
    }
  },
  "included": [
    {
      "id": "1321",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person735@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:30.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:30.283+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 567
          }
        },
        "company": {
          "data": null
        },
        "subsidiary": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 1
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/salaries/34

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "salaries",
    "attributes": {
      "started_on": "2020-08-10",
      "ended_on": "2020-08-10",
      "working_hours": [
        1,
        1,
        1,
        1,
        1,
        1,
        1
      ]
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1323"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "34",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-08-11",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000,
      "monthly_cost": 320000,
      "monthly_cost_default": 400000,
      "monthly_cost_normalized": 320000,
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 568
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1323"
        }
      }
    }
  },
  "included": [
    {
      "id": "1323",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person736@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:05:30.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:05:30.496+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 568
          }
        },
        "company": {
          "data": null
        },
        "subsidiary": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 1
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Update a salary
PATCH/api/v2/salaries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

salary id


DELETE /api/v2/salaries/1
Requestsdeletes salary

DELETE  /api/v2/salaries/35

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a salary
DELETE/api/v2/salaries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

salary id


Generated by aglio on 10 Aug 2020