Change the diary
diary_writeWrite or remove one day's entry in a trip's diary; owner only. put creates the day's entry or replaces it whole: entry.public defaults to false when omitted, so leave it out only to take an entry off the public share page. A date outside the trip's dates is validation_failed. delete removes the day's entry; deleting a day that has none succeeds and changes nothing. Both take an optional expectedUpdatedAt (the entry's updatedAt as you read it): if the entry changed or was removed since, nothing is written and the answer is stale_write with the current version (actual, or null when the day has no entry). To write a day you saw empty without overwriting an entry someone else wrote meanwhile, put with expectedAbsent: true instead (never together with expectedUpdatedAt, which is bad_request); a day that has an entry by then answers stale_write with its version as actual. A trip's diary holds at most one entry per calendar day of the trip, addressed by the trip id and the date (YYYY-MM-DD, the trip's local calendar date, between the trip's startDate and endDate inclusive). An entry's body is plain text (1-8000 characters, not only whitespace; line breaks are kept). public says whether the entry shows on the trip's public share page; the owner and linked crew see every entry either way. IDs are 6-character case-sensitive alphanumeric strings. Timestamps are UTC ISO 8601. Distances are integer meters. Durations are integer seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||