Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 135 lines (95 sloc) 3.951 kb
1fdca26 @qrush add the rest of the docs
qrush authored
1 Notes
2 =====
3
c3c2937 @qrush Become Basecamp
qrush authored
4 For the full XML representation of notes, [check out the data reference](https://github.com/basecamp/highrise-api/blob/master/sections/data_reference.md#note).
3754717 @qrush add links to data reference
qrush authored
5
1fdca26 @qrush add the rest of the docs
qrush authored
6
7 Get note
8 --------
9
10 * `GET /notes/#{id}.xml` returns a single note.
11
12 Attachments are included, but comments are kept separate at `/notes/#{id}/comments.xml`.
13
14 **Response:**
15
16 ``` xml
17 <note>
18 <id type="integer">7</id>
19 <body>Hello world!</body>
20 <author-id type="integer">3</author-id>
21 <subject-id type="integer">1</subject-id>
22 <subject-type>#{ Party || Deal || Kase }</subject-type>
23 <subject-name>John Doe</subject-name>
24 <collection-id type="integer">1</subject-id>
25 <collection-type>#{ Deal || Kase }</subject-type>
26 <visible-to>#{Everyone || Owner || NamedGroup}</visible-to>
27 <owner-id type="integer">#{ user_id -- when visble-to is "Owner"}</owner-id>
28 <group-id type="integer">#{ group_id -- when visble-to is "NamedGroup"}</group-id>
29 <updated-at type="datetime">2007-02-27T18:42:28Z</updated-at>
30 <created-at type="datetime">2006-05-16T17:26:00Z</created-at>
31 <attachments>
32 <attachment>
33 <id type="integer">1</id>
34 <url>https://example.highrisehq.com/files/1</url>
35 <name>picture.png</name>
db3d079 Fix closing tag of <size>
Heikki Pora authored
36 <size type="integer">72633</size>
1fdca26 @qrush add the rest of the docs
qrush authored
37 </attachment>
38 <attachment>
39 <id type="integer">2</id>
40 <url>https://example.highrisehq.com/files/2</url>
41 <name>document.txt</name>
05586bf @jimmackenzie Fix closing <size> tag
jimmackenzie authored
42 <size type="integer">8837</size>
1fdca26 @qrush add the rest of the docs
qrush authored
43 </attachment>
44 </attachments>
45 </note>
46 ```
47
48
49 Get notes
50 ---------
51
52 * `GET /#{ people || companies || kases || deals }/#{subject-id}/notes.xml` returns a collection of notes that are visible to the authenticated user and related to a specific person, company, case or deal.
53
d850379 @taystack Typo
taystack authored
54 * `GET /#{ people || companies || kases || deals }/#{subject-id}/notes.xml?since=20070425154546` returns only the notes that have been updated since the time in the query parameter. The collection will be ordered from oldest to newest. The `since` parameter is expressed as `yyyymmddhhmmss` in the UTC timezone.
5e54a66 @trevorturk Emails and Notes support the 'since' parameter
trevorturk authored
55
56 Notes are paginated using offsets. If 25 elements are returned (the page limit), use `?n=25` to fetch the next 25, and so on.
1fdca26 @qrush add the rest of the docs
qrush authored
57
58 **Response:**
59
60 ``` xml
61 <notes>
62 <note>
63 ...
64 </note>
65 <note>
66 ...
67 </note>
68 </notes>
69 ```
70
71
72 Create note
73 -----------
74
75 * `POST /notes.xml (or like: /people/#{person-id}/notes.xml)` creates a new note with the currently authenticated user as the author.
76
77 The XML for the new note is returned on a successful request with the timestamps recorded and ids for the contact data associated.
78
79 The subject of the note (who it belongs to) can either be set through the url or through the subject-type and subject-id tags. Using `/companies/5/notes.xml` as the target for the POST is the same as using /notes.xml with subject-type `Party` and subject-id `5`.
80
81 By default, a new note is assumed to be visible to `Everyone`. You can also chose to make the note only visible to the creator using `Owner` as the value for the `visible-to` tag. Or `NamedGroup` and pass in a `group-id` tag too.
82
83 Note: Adding attachments to a note is not yet supported.
84
85 As always, the URL for the newly-created note is passed back in the `Location` header.
86
87 **Request:**
88
89 ``` xml
90 <note>
91 <body>Hello world!</body>
92 <subject-id type="integer">4</subject-id>
93 <subject-type>Party</subject-type>
94 </note>
95 ```
96
97 **Response:**
98
99 Status: 201 Created
100 Location: https://example.highrisehq.com/notes/#{new-note-id}.xml
101
102 <note>
103 ...
104 </note>
105
106
107 Update note
108 -----------
109
110 * `PUT /notes/#{id}.xml` updates an existing note with new details from the submitted XML.
111
112 **Request:**
113
114 ``` xml
115 <note>
116 <body>Hello world is now part of a case!</body>
117 <subject-id>1</subject-id>
118 <subject-type>#{ Party || Deal || Kase }</subject-type>
119 </note>
120 ```
121
122 **Response:**
123
124 Status: 200 OK
125
126
127 Destroy note
128 ------------
129
130 * `DELETE /notes/#{id}.xml` destroys the note at the referenced URL.
131
132 **Response:**
133
134 Status: 200 OK
Something went wrong with that request. Please try again.