Skip to content

Commit 44146ea

Browse files
authored
Merge pull request #202 from tutorcruncher/update-description
API docs improvements
2 parents 7870334 + 6f0359c commit 44146ea

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/env/
44
.idea
55
/__pycache__/
6+
.env

pages/appointments/create-an-appointment.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@
2121
}
2222
],
2323
"repeater": null,
24-
"service": 23,
24+
"service": {
25+
"id":23,
26+
"name": "Service 23",
27+
"dft_charge_type": "hourly",
28+
"created": "2019-03-15T17:37:46.829300Z",
29+
"dft_charge_rate": "100.00",
30+
"dft_contractor_rate": "56.00",
31+
"last_updated": "2019-03-15T17:38:02.989696Z",
32+
"status": "available",
33+
"url": "https://secure.tutorcruncher.com/api/services/23/"
34+
},
2535
"status": "planned",
2636
"units": "2.00000",
2737
"extra_attrs": {}

pages/appointments/update-an-appointment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
Updating an Appointment is similar to [Creating an Appointment](#create-an-appointment). One major difference is
44
that you cannot add, edit or delete Recipients or Contractors on the Appointment. To do this you must use the endpoints
55
[Add/Edit Recipient on Appointment](#create-update-rcra), [Remove Recipient from Appointment](#remove-rcra),
6-
[Add/Edit Contractor on Appointment](#create-update-cja) or [Remove Contractor from Appointment](#remove-cja).
6+
[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.

pages/creating-updating-users/creating-updating-users.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
address as a unique identifier when creating/updating using the API. If you use the email address when
33
creating/updating, we will check for an email address in the user data and check if this user already exists.
44

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

99
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.

pages/invoices/take-invoice-payment.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"amount_paid": "100.00",
44
"still_to_pay": "185.00",
55
"message": "Payment successfully created",
6-
"paid": false
6+
"paid": true,
7+
"method": "cash"
78
}

pages/invoices/take-invoice-payment.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
Pay partially or pay in full, post how much the Client paid towards the Invoice and we'll return how much there is
44
`still_to_pay`. If fully paid off, `paid` will return a value of `true`. Any excess will be set in the Client's
5-
Available Balance on their TutorCruncher profile.
5+
Available Balance on their TutorCruncher profile. The `method` parameter specifies the offline payment method.
6+
Available options are: `cash`, `cheque`, `credit_card`, `transferwise`, `debit_card`, `bank_transfer`, `direct_debit`,
7+
`bonus_credit`, `manual`, and `voucher`.

pages/proforma-invoices/take-proforma-invoice-payment.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"amount_paid": "100.00",
44
"still_to_pay": "185.00",
55
"message": "Payment successfully created",
6-
"paid": false
6+
"paid": true
77
}

0 commit comments

Comments
 (0)