Skip to content

Commit adea57c

Browse files
committed
Job change docs
1 parent 0bd5b81 commit adea57c

18 files changed

+297
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"allow_proposed_rates": false,
3+
"branch": 3,
4+
"branch_tax_setup": "Default Company Tax (20%)",
5+
"cap": null,
6+
"colour": "SlateGray",
7+
"conjobs": [
8+
{
9+
"contractor": 43,
10+
"contractor_permissions": "edit",
11+
"name": "last_namé_4",
12+
"pay_rate": "100.00"
13+
},
14+
],
15+
"contractor_tax_setup": "Default Tutor Tax (no tax)",
16+
"created": "2018-01-02T12:00:00Z",
17+
"description": "servicé 0",
18+
"dft_charge_type": "hourly",
19+
"dft_charge_rate": 100.0,
20+
"dft_contractor_permissions": "add-edit-complete",
21+
"dft_contractor_rate": 50.0,
22+
"dft_location": null,
23+
"dft_max_srs": null,
24+
"extra_attrs": [],
25+
"extra_fee_per_apt": null,
26+
"id": 302,
27+
"inactivity_time": 14,
28+
"is_bookable": false,
29+
"is_deleted": false,
30+
"labels": [],
31+
"last_updated": "2025-02-26T11:58:03.204439Z",
32+
"latest_apt_ahc": "2025-02-26T11:58:02.644095Z",
33+
"name": "Servicé 0",
34+
"net_gross": "gross",
35+
"rcrs": [],
36+
"report_required": false,
37+
"require_con_job": true,
38+
"require_rcr": true,
39+
"review_units": null,
40+
"sales_codes": null,
41+
"desired_skills": [],
42+
"sr_premium": null,
43+
"status": "available",
44+
"total_apt_units": 2.0
45+
}

pages/services/create-update-cj.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Add/Edit Contractor on Service
2+
3+
This endpoint is for existing Services. To add a new Contractor or edit an existing
4+
Contractor's `pay_rate`, simply supply the Contractor's ID and the `pay_rate`. The `pay_rate`
5+
is not required and if no value is passed we will use the Service's `dft_pay_rate` or keep their existing `pay_rate`.
6+
This will not update any pay rates on existing appointments and will not be able to add contractors to existing
7+
appointments. To add a contractor to an existing appointment, use the `Add/Edit Contractor on Appointment` endpoint.

pages/services/create-update-cj.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pprint, requests
2+
3+
headers = {'Authorization': 'token <API KEY>'}
4+
data = {
5+
"contractor": 43,
6+
"pay_rate": "100.00",
7+
"contractor_permissions": "edit"
8+
}
9+
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/contractor/add/', json=data, headers=headers)
10+
pprint.pprint(r.json())
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"allow_proposed_rates": false,
3+
"branch": 411,
4+
"branch_tax_setup": "Default Company Tax (20%)",
5+
"cap": null,
6+
"colour": "Tomato",
7+
"conjobs": [],
8+
"contractor_tax_setup": "Default Tutor Tax (no tax)",
9+
"created": "2018-01-02T12:00:00Z",
10+
"description": "servicé 0",
11+
"dft_charge_type": "hourly",
12+
"dft_charge_rate": 100.0,
13+
"dft_contractor_permissions": "add-edit-complete",
14+
"dft_contractor_rate": 50.0,
15+
"dft_location": null,
16+
"dft_max_srs": null,
17+
"extra_attrs": [],
18+
"extra_fee_per_apt": null,
19+
"id": 304,
20+
"inactivity_time": 14,
21+
"is_bookable": false,
22+
"is_deleted": false,
23+
"labels": [],
24+
"last_updated": "2025-02-26T12:09:38.307429Z",
25+
"latest_apt_ahc": "2025-02-26T12:09:37.736799Z",
26+
"name": "Servicé 0",
27+
"net_gross": "gross",
28+
"rcrs": [
29+
{
30+
"recipient": 2007,
31+
"recipient_name": "last_namé_0",
32+
"paying_client": 2006,
33+
"paying_client_name": "last_namé_1",
34+
"charge_rate": "100.00",
35+
"agent": 2012,
36+
"agent_name": "last_namé_6",
37+
"agent_percentage": "10.000",
38+
}
39+
],
40+
"report_required": false,
41+
"require_con_job": True,
42+
"require_rcr": True,
43+
"review_units": null,
44+
"sales_codes": null,
45+
"desired_skills": [],
46+
"sr_premium": null,
47+
"status": "available",
48+
"total_apt_units": 2.0
49+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Add/Edit Recipient on Service
2+
3+
To add a new Recipient or edit an existing Recipient's `charge_rate`, simply supply the Recipient's ID and
4+
the `charge_rate`. The `charge_rate` is not required and if no value is passed we will use the Service's
5+
`dft_charge_rate` or keep their existing `charge_rate`.
6+
This will not update any charge rates on existing appointments and will not be able to add recipients to existing
7+
appointments. To add a recipient to an existing appointment, use the `Add/Edit Recipient on Appointment` endpoint.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pprint, requests
2+
3+
headers = {'Authorization': 'token <API KEY>'}
4+
data = {
5+
'recipient': 2007,
6+
'charge_rate': 100,
7+
'agent': 2012,
8+
'agent_percentage': 10,
9+
}
10+
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/recipient/add/', json=data, headers=headers)
11+
pprint.pprint(r.json())

pages/services/remove-cj.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"allow_proposed_rates": false,
3+
"branch": 414,
4+
"branch_tax_setup": "Default Company Tax (20%)",
5+
"cap": null,
6+
"colour": "MediumBlue",
7+
"conjobs": [],
8+
"contractor_tax_setup": "Default Tutor Tax (no tax)",
9+
"created": "2018-01-02T12:00:00Z",
10+
"description": "servicé 0",
11+
"dft_charge_type": "hourly",
12+
"dft_charge_rate": 100.0,
13+
"dft_contractor_permissions": "add-edit-complete",
14+
"dft_contractor_rate": 50.0,
15+
"dft_location": null,
16+
"dft_max_srs": null,
17+
"extra_attrs": [],
18+
"extra_fee_per_apt": null,
19+
"id": 307,
20+
"inactivity_time": 14,
21+
"is_bookable": false,
22+
"is_deleted": false,
23+
"labels": [],
24+
"last_updated": "2025-02-26T12:16:28.193502Z",
25+
"latest_apt_ahc": "2025-02-26T12:16:27.644631Z",
26+
"name": "Servicé 0",
27+
"net_gross": "gross",
28+
"rcrs": [],
29+
"report_required": false,
30+
"require_con_job": true,
31+
"require_rcr": true,
32+
"review_units": null,
33+
"sales_codes": null,
34+
"desired_skills": [],
35+
"sr_premium": null,
36+
"status": "available",
37+
"total_apt_units": 2.0,
38+
}

pages/services/remove-cj.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Remove Contractor from Service
2+
3+
To remove a Contractor from a Service simply pass the Contractor's ID in the field `contractor`.

pages/services/remove-cj.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pprint, requests
2+
3+
headers = {'Authorization': 'token <API KEY>'}
4+
data = {
5+
"contractor": 43,
6+
}
7+
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/contractor/remove/', json=data, headers=headers)
8+
pprint.pprint(r.json())

pages/services/remove-rcr.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"allow_proposed_rates": false,
3+
"branch": 412,
4+
"branch_tax_setup": "Default Company Tax (20%)",
5+
"cap": null,
6+
"colour": "PeachPuff",
7+
"conjobs": [],
8+
"contractor_tax_setup": "Default Tutor Tax (no tax)",
9+
"created": "2018-01-02T12:00:00Z",
10+
"description": "servicé 0",
11+
"dft_charge_type": "hourly",
12+
"dft_charge_rate": 100.0,
13+
"dft_contractor_permissions": "add-edit-complete",
14+
"dft_contractor_rate": 50.0,
15+
"dft_location": null,
16+
"dft_max_srs": null,
17+
"extra_attrs": [],
18+
"extra_fee_per_apt": null,
19+
"id": 305,
20+
"inactivity_time": 14,
21+
"is_bookable": false,
22+
"is_deleted": false,
23+
"labels": [],
24+
"last_updated": "2025-02-26T12:12:20.165851Z",
25+
"latest_apt_ahc": "2025-02-26T12:12:19.585970Z",
26+
"name": "Servicé 0",
27+
"net_gross": "gross",
28+
"rcrs": [],
29+
"report_required": false,
30+
"require_con_job": true,
31+
"require_rcr": true,
32+
"review_units": null,
33+
"sales_codes": null,
34+
"desired_skills": [],
35+
"sr_premium": null,
36+
"status": "available",
37+
"total_apt_units": 2.0,
38+
}

0 commit comments

Comments
 (0)