-
Notifications
You must be signed in to change notification settings - Fork 0
Job change docs #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Job change docs #190
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
### Update an Agent | ||
|
||
Update an Agent object by supplying the ID as the unique identifier in the url. You must also supply required fields | ||
like `last_name` even if they are not being updated. You only need to post information that you want to change and | ||
not the whole Agent object. | ||
Update an Agent object by supplying the ID as the unique identifier in the url. You only need to post | ||
information that you want to change and not the whole Agent object. | ||
|
||
Check out [Creating/Updating Users](#creating-updating-users) for more information on linking to a specific user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
### Update a Client | ||
|
||
Update an Client object by supplying the ID as the unique identifier in the url. You must also supply required fields | ||
like `last_name` even if they are not being updated. You only need to post information that you want to change and | ||
not the whole Client object. | ||
Update an Client object by supplying the ID as the unique identifier in the url. You only need to post information | ||
that you want to change and not the whole Client object. | ||
|
||
Check out [Creating/Updating Users](#creating-updating-users) for more information on linking to a specific user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
### Update a Contractor | ||
|
||
Update an Contractor object by supplying the ID as the unique identifier in the url. You must also supply required fields | ||
like `last_name` even if they are not being updated. You only need to post information that you want to change and | ||
not the whole Contractor object. | ||
Update an Contractor object by supplying the ID as the unique identifier in the url. | ||
You only need to post information that you want to change and not the whole Contractor object. | ||
|
||
Check out [Creating/Updating Users](#creating-updating-users) for more information on linking to a specific user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
### Update a Recipient | ||
|
||
Update an Recipient object by supplying the ID as the unique identifier in the url. You must also supply required fields | ||
like `last_name` even if they are not being updated. You only need to post information that you want to change and | ||
not the whole Recipient object. | ||
Update an Recipient object by supplying the ID as the unique identifier in the url. | ||
You only need to post information that you want to change and not the whole Recipient object. | ||
|
||
Check out [Creating/Updating Users](#creating-updating-users) for more information on linking to a specific user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"allow_proposed_rates": false, | ||
"branch": 3, | ||
"branch_tax_setup": "Default Company Tax (20%)", | ||
"cap": null, | ||
"colour": "SlateGray", | ||
"conjobs": [ | ||
{ | ||
"contractor": 43, | ||
"contractor_permissions": "edit", | ||
"name": "last_namé_4", | ||
"pay_rate": "100.00" | ||
}, | ||
], | ||
"contractor_tax_setup": "Default Tutor Tax (no tax)", | ||
"created": "2018-01-02T12:00:00Z", | ||
"description": "servicé 0", | ||
"dft_charge_type": "hourly", | ||
"dft_charge_rate": 100.0, | ||
"dft_contractor_permissions": "add-edit-complete", | ||
"dft_contractor_rate": 50.0, | ||
"dft_location": null, | ||
"dft_max_srs": null, | ||
"extra_attrs": [], | ||
"extra_fee_per_apt": null, | ||
"id": 302, | ||
"inactivity_time": 14, | ||
"is_bookable": false, | ||
"is_deleted": false, | ||
"labels": [], | ||
"last_updated": "2025-02-26T11:58:03.204439Z", | ||
"latest_apt_ahc": "2025-02-26T11:58:02.644095Z", | ||
"name": "Servicé 0", | ||
"net_gross": "gross", | ||
"rcrs": [], | ||
"report_required": false, | ||
"require_con_job": true, | ||
"require_rcr": true, | ||
"review_units": null, | ||
"sales_codes": null, | ||
"desired_skills": [], | ||
"sr_premium": null, | ||
"status": "available", | ||
"total_apt_units": 2.0 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### Add/Edit Contractor on Service | ||
|
||
This endpoint is for existing Services. To add a new Contractor or edit an existing | ||
Contractor's `pay_rate`, simply supply the Contractor's ID and the `pay_rate`. The `pay_rate` | ||
is not required and if no value is passed we will use the Service's `dft_pay_rate` or keep their existing `pay_rate`. | ||
This will not update any pay rates on existing appointments and will not be able to add contractors to existing | ||
appointments. To add a contractor to an existing appointment, use the `Add/Edit Contractor on Appointment` endpoint. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import pprint, requests | ||
|
||
headers = {'Authorization': 'token <API KEY>'} | ||
data = { | ||
"contractor": 43, | ||
"pay_rate": "100.00", | ||
"contractor_permissions": "edit" | ||
} | ||
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/contractor/add/', json=data, headers=headers) | ||
pprint.pprint(r.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"allow_proposed_rates": false, | ||
"branch": 411, | ||
"branch_tax_setup": "Default Company Tax (20%)", | ||
"cap": null, | ||
"colour": "Tomato", | ||
"conjobs": [], | ||
"contractor_tax_setup": "Default Tutor Tax (no tax)", | ||
"created": "2018-01-02T12:00:00Z", | ||
"description": "servicé 0", | ||
"dft_charge_type": "hourly", | ||
"dft_charge_rate": 100.0, | ||
"dft_contractor_permissions": "add-edit-complete", | ||
"dft_contractor_rate": 50.0, | ||
"dft_location": null, | ||
"dft_max_srs": null, | ||
"extra_attrs": [], | ||
"extra_fee_per_apt": null, | ||
"id": 304, | ||
"inactivity_time": 14, | ||
"is_bookable": false, | ||
"is_deleted": false, | ||
"labels": [], | ||
"last_updated": "2025-02-26T12:09:38.307429Z", | ||
"latest_apt_ahc": "2025-02-26T12:09:37.736799Z", | ||
"name": "Servicé 0", | ||
"net_gross": "gross", | ||
"rcrs": [ | ||
{ | ||
"recipient": 2007, | ||
"recipient_name": "last_namé_0", | ||
"paying_client": 2006, | ||
"paying_client_name": "last_namé_1", | ||
"charge_rate": "100.00", | ||
"agent": 2012, | ||
"agent_name": "last_namé_6", | ||
"agent_percentage": "10.000", | ||
} | ||
], | ||
"report_required": false, | ||
"require_con_job": True, | ||
"require_rcr": True, | ||
"review_units": null, | ||
"sales_codes": null, | ||
"desired_skills": [], | ||
"sr_premium": null, | ||
"status": "available", | ||
"total_apt_units": 2.0 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### Add/Edit Recipient on Service | ||
|
||
To add a new Recipient or edit an existing Recipient's `charge_rate`, simply supply the Recipient's ID and | ||
the `charge_rate`. The `charge_rate` is not required and if no value is passed we will use the Service's | ||
`dft_charge_rate` or keep their existing `charge_rate`. | ||
This will not update any charge rates on existing appointments and will not be able to add recipients to existing | ||
appointments. To add a recipient to an existing appointment, use the `Add/Edit Recipient on Appointment` endpoint. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import pprint, requests | ||
|
||
headers = {'Authorization': 'token <API KEY>'} | ||
data = { | ||
'recipient': 2007, | ||
'charge_rate': 100, | ||
'agent': 2012, | ||
'agent_percentage': 10, | ||
} | ||
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/recipient/add/', json=data, headers=headers) | ||
pprint.pprint(r.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"allow_proposed_rates": false, | ||
"branch": 414, | ||
"branch_tax_setup": "Default Company Tax (20%)", | ||
"cap": null, | ||
"colour": "MediumBlue", | ||
"conjobs": [], | ||
"contractor_tax_setup": "Default Tutor Tax (no tax)", | ||
"created": "2018-01-02T12:00:00Z", | ||
"description": "servicé 0", | ||
"dft_charge_type": "hourly", | ||
"dft_charge_rate": 100.0, | ||
"dft_contractor_permissions": "add-edit-complete", | ||
"dft_contractor_rate": 50.0, | ||
"dft_location": null, | ||
"dft_max_srs": null, | ||
"extra_attrs": [], | ||
"extra_fee_per_apt": null, | ||
"id": 307, | ||
"inactivity_time": 14, | ||
"is_bookable": false, | ||
"is_deleted": false, | ||
"labels": [], | ||
"last_updated": "2025-02-26T12:16:28.193502Z", | ||
"latest_apt_ahc": "2025-02-26T12:16:27.644631Z", | ||
"name": "Servicé 0", | ||
"net_gross": "gross", | ||
"rcrs": [], | ||
"report_required": false, | ||
"require_con_job": true, | ||
"require_rcr": true, | ||
"review_units": null, | ||
"sales_codes": null, | ||
"desired_skills": [], | ||
"sr_premium": null, | ||
"status": "available", | ||
"total_apt_units": 2.0, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Remove Contractor from Service | ||
|
||
To remove a Contractor from a Service simply pass the Contractor's ID in the field `contractor`. | ||
It is not possible to remove a Contractor from a Service if they are currently assigned to any Appointments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import pprint, requests | ||
|
||
headers = {'Authorization': 'token <API KEY>'} | ||
data = { | ||
"contractor": 43, | ||
} | ||
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/contractor/remove/', json=data, headers=headers) | ||
pprint.pprint(r.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"allow_proposed_rates": false, | ||
"branch": 412, | ||
"branch_tax_setup": "Default Company Tax (20%)", | ||
"cap": null, | ||
"colour": "PeachPuff", | ||
"conjobs": [], | ||
"contractor_tax_setup": "Default Tutor Tax (no tax)", | ||
"created": "2018-01-02T12:00:00Z", | ||
"description": "servicé 0", | ||
"dft_charge_type": "hourly", | ||
"dft_charge_rate": 100.0, | ||
"dft_contractor_permissions": "add-edit-complete", | ||
"dft_contractor_rate": 50.0, | ||
"dft_location": null, | ||
"dft_max_srs": null, | ||
"extra_attrs": [], | ||
"extra_fee_per_apt": null, | ||
"id": 305, | ||
"inactivity_time": 14, | ||
"is_bookable": false, | ||
"is_deleted": false, | ||
"labels": [], | ||
"last_updated": "2025-02-26T12:12:20.165851Z", | ||
"latest_apt_ahc": "2025-02-26T12:12:19.585970Z", | ||
"name": "Servicé 0", | ||
"net_gross": "gross", | ||
"rcrs": [], | ||
"report_required": false, | ||
"require_con_job": true, | ||
"require_rcr": true, | ||
"review_units": null, | ||
"sales_codes": null, | ||
"desired_skills": [], | ||
"sr_premium": null, | ||
"status": "available", | ||
"total_apt_units": 2.0, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Remove Recipient from Service | ||
|
||
To remove a Recipient from a Service simply pass the Recipient's ID in the field `recipient`. | ||
It is not possible to remove a Recipient from a Service if they are currently assigned to any Appointments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import pprint, requests | ||
|
||
headers = {'Authorization': 'token <API KEY>'} | ||
data = { | ||
"recipient": 23, | ||
} | ||
r = requests.post('https://secure.tutorcruncher.com/api/services/<id>/recipient/remove/', json=data, headers=headers) | ||
pprint.pprint(r.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"id": 73, | ||
"description": "I love science", | ||
"contractor": { | ||
"id": 1985, | ||
"first_name": null, | ||
"last_name": "Teacherson", | ||
"email": "[email protected]", | ||
"url": "https://secure.tutorcruncher.com/api/contractors/1985/" | ||
}, | ||
"created": "2019-01-01T00:00:00Z", | ||
"proposed_rate": null, | ||
"service": { | ||
"id": 300, | ||
"name": "Jobalot", | ||
"dft_charge_type": "hourly", | ||
"created": "2019-01-01T00:00:00Z", | ||
"dft_charge_rate": "100.00", | ||
"dft_contractor_rate": "50.00", | ||
"last_updated": "2025-02-25T17:30:52.234437Z", | ||
"status": "available", | ||
"url": "https://secure.tutorcruncher.com/api/services/300/" | ||
}, | ||
"status": "accepted" | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Accept a tender | ||
|
||
Accepts an existing tender, adding the related contractor to the Service. Functions the same as if a job application | ||
was approved through the UI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import pprint, requests | ||
|
||
headers = {'Authorization': 'token <API KEY>'} | ||
r = requests.post('https://secure.tutorcruncher.com/api/tenders/<id>/accept/', headers=headers) | ||
pprint.pprint(r.json()) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.