Skip to content

API docs improvements #202

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/env/
.idea
/__pycache__/
.env
12 changes: 11 additions & 1 deletion pages/appointments/create-an-appointment.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
}
],
"repeater": null,
"service": 23,
"service": {
"id":23,
"name": "Service 23",
"dft_charge_type": "hourly",
"created": "2019-03-15T17:37:46.829300Z",
"dft_charge_rate": "100.00",
"dft_contractor_rate": "56.00",
"last_updated": "2019-03-15T17:38:02.989696Z",
"status": "available",
"url": "https://secure.tutorcruncher.com/api/services/23/"
},
"status": "planned",
"units": "2.00000",
"extra_attrs": {}
Expand Down
2 changes: 1 addition & 1 deletion pages/appointments/update-an-appointment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Updating an Appointment is similar to [Creating an Appointment](#create-an-appointment). One major difference is
that you cannot add, edit or delete Recipients or Contractors on the Appointment. To do this you must use the endpoints
[Add/Edit Recipient on Appointment](#create-update-rcra), [Remove Recipient from Appointment](#remove-rcra),
[Add/Edit Contractor on Appointment](#create-update-cja) or [Remove Contractor from Appointment](#remove-cja).
[Add/Edit Contractor on Appointment](#create-update-cja) or [Remove Contractor from Appointment](#remove-cja). Note that only Appointments with status `Planned` can be updated.
6 changes: 3 additions & 3 deletions pages/creating-updating-users/creating-updating-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
address as a unique identifier when creating/updating using the API. If you use the email address when
creating/updating, we will check for an email address in the user data and check if this user already exists.

You can create a user without an email address, however, you will not be able to update the user. You must also
include the users last name when creating/updating as this field is required. Any other role specific required
fields are specified on the endpoint description.
You can create a user without an email address, but the user's last name is required when creating a new user.
To update an existing user, provide the user's ID as the unique identifier
in the URL. Any additional role-specific required fields are detailed in the endpoint documentation.

Profile photos can be optionally added or updated for all user roles — [Agents](#agents), [Clients](#clients), [Contractors](#contractors), and [Recipients](#recipients) — by including a `photo` field with a valid image URL when creating or updating a user. If the image is valid and accessible, it will be downloaded, processed into thumbnails, and included in the response. If the `photo` field is omitted during an update, the current photo remains unchanged. To remove an existing photo, set the `photo` field to `null`. Invalid, corrupted, or inaccessible image URLs will result in a `400 Bad Request` with an appropriate error message.
3 changes: 2 additions & 1 deletion pages/invoices/take-invoice-payment.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"amount_paid": "100.00",
"still_to_pay": "185.00",
"message": "Payment successfully created",
"paid": false
"paid": true,
"method": "cash"
}
4 changes: 3 additions & 1 deletion pages/invoices/take-invoice-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

Pay partially or pay in full, post how much the Client paid towards the Invoice and we'll return how much there is
`still_to_pay`. If fully paid off, `paid` will return a value of `true`. Any excess will be set in the Client's
Available Balance on their TutorCruncher profile.
Available Balance on their TutorCruncher profile. The `method` parameter specifies the offline payment method.
Available options are: `cash`, `cheque`, `credit_card`, `transferwise`, `debit_card`, `bank_transfer`, `direct_debit`,
`bonus_credit`, `manual`, and `voucher`.
2 changes: 1 addition & 1 deletion pages/proforma-invoices/take-proforma-invoice-payment.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"amount_paid": "100.00",
"still_to_pay": "185.00",
"message": "Payment successfully created",
"paid": false
"paid": true
}