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": "55",
      "type": "salaries",
      "attributes": {
        "working_days": [],
        "working_hours": [
          8,
          8,
          8,
          8,
          8,
          0,
          0
        ],
        "salary_type_id": 2,
        "started_on": "2019-10-21",
        "ended_on": "2020-09-21",
        "hours": "8.0",
        "overhead": true,
        "note": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "cost": 2000,
        "cost_default": 2500,
        "cost_normalized": 2000,
        "hourly_rate": 2000,
        "hourly_rate_default": 2500,
        "hourly_rate_normalized": 2000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 581
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "1434"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "1434",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1389@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:26.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:26.460+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 581
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1932"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1932",
      "type": "companies",
      "attributes": {
        "name": "Client1352",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:05:26.455+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 581
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get salaries
GET/api/v2/salaries


GET /api/v2/salaries/1
Requestsreturns salary

GET  /api/v2/salaries/56

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": "56",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-10-21",
      "ended_on": "2020-09-21",
      "hours": "8.0",
      "overhead": true,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000,
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 582
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1436"
        }
      }
    }
  },
  "included": [
    {
      "id": "1436",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1391@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:26.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:26.652+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 582
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1934"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1934",
      "type": "companies",
      "attributes": {
        "name": "Client1353",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:05:26.647+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 582
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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-10-21",
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "cost": 2000,
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ]
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1438"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "58",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2020-10-21",
      "ended_on": null,
      "hours": "8.0",
      "overhead": true,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000,
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 583
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1438"
        }
      }
    }
  },
  "included": [
    {
      "id": "1438",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1393@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:26.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:26.881+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 583
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1936"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1936",
      "type": "companies",
      "attributes": {
        "name": "Client1354",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:05:26.876+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 583
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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",
      "cost": 2000,
      "overhead": false
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1440"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "59",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-10-21",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000,
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 584
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1440"
        }
      }
    }
  },
  "included": [
    {
      "id": "1440",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person832@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:27.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:27.148+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 584
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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",
      "cost": 2000,
      "overhead": false
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1442"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "60",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-10-21",
      "ended_on": null,
      "hours": "8.0"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 585
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1442"
        }
      }
    }
  },
  "included": [
    {
      "id": "1442",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person834@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:27.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:27.424+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 585
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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": "1444"
        }
      }
    }
  }
}
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/cost"
      }
    },
    {
      "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"
      }
    }
  ]
}

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-10-21",
      "salary_type_id": 2,
      "hours": "8.0",
      "currency": "EUR",
      "cost": 2000,
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ]
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1446"
        }
      }
    }
  }
}
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",
      "cost": 2000,
      "hours": 8,
      "overhead": true
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1448"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "62",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-10-21",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000,
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 588
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1448"
        }
      }
    }
  },
  "included": [
    {
      "id": "1448",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person837@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:27.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:27.889+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 588
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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",
      "cost": 2000,
      "overhead": false
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1450"
        }
      }
    }
  }
}
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/65

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": {
      "cost": ""
    }
  }
}
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/cost"
      }
    }
  ]
}

PATCH  /api/v2/salaries/67

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": "1460"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "67",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-10-21",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000,
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 594
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1460"
        }
      }
    }
  },
  "included": [
    {
      "id": "1460",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person844@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:28.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:28.922+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 594
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/salaries/68

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-10-20",
      "ended_on": "2020-10-20",
      "working_hours": [
        1,
        1,
        1,
        1,
        1,
        1,
        1
      ]
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "1462"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "68",
    "type": "salaries",
    "attributes": {
      "working_days": [],
      "working_hours": [
        8,
        8,
        8,
        8,
        8,
        0,
        0
      ],
      "salary_type_id": 2,
      "started_on": "2019-10-21",
      "ended_on": null,
      "hours": "8.0",
      "overhead": false,
      "note": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "cost": 2000,
      "cost_default": 2500,
      "cost_normalized": 2000,
      "hourly_rate": 2000,
      "hourly_rate_default": 2500,
      "hourly_rate_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 595
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "1462"
        }
      }
    }
  },
  "included": [
    {
      "id": "1462",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "person845@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:05:29.000+02:00",
        "is_user": false,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:05:29.168+02:00",
        "placeholder": true,
        "color_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 595
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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/69

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 20 Oct 2020