Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
api:api_applications_id_offers_id_notes [2021/11/17 16:35] Lauriapi:api_applications_id_offers_id_notes [2025/03/28 22:45] (current) – [Response example] Lauri
Line 26: Line 26:
 ==== Response example ==== ==== Response example ====
  
-  "Some comments"+== API version >= 6 ==
  
 +  {
 +    "1": {
 +        "created": "1970-01-01T00:00:01+00:00",
 +        "removed": null,
 +        "colour": "Yellow",
 +        "pinned": false,
 +        "collapsed": false,
 +        "Notes": "Some comments",
 +    },
 +    "2": {
 +        "created": "1970-01-01T00:00:01+00:00",
 +        "removed": null,
 +        "colour": "Salmon",
 +        "pinned": true,
 +        "collapsed": false,
 +        "Notes": "Some other comments",
 +    },
 +  }
  
-===== PUT =====+== API version  < 6 ==
  
-Set the notes to some text, overwriting the existing notes. +  "Some comments"
- +
-==== Syntax ==== +
- +
-  PUT /api/applications/123/offers/321/notes +
-  Host: apply.example.edu +
-  Authorization: DREAM apikey="..." +
- +
-==== Raw request body ==== +
- +
-Note that the comments have to be a proper JSON string token. In a JSON string only space is allowed per the specification, newlines, for example, have to be encoded. +
- +
-  "Some notes\nAnother line" +
- +
-==== Response headers ==== +
- +
-  Content-Type: text/plain +
-  Content-Length:+
- +
-==== Response codes ==== +
- +
-| ''204 No Content'' | The notes were saved | +
-| ''400 Bad Request'' | Invalid notes. Please make sure that status is a valid JSON string with quotes. | +
-| ''404 Not Found'' | Application does not have this offer |+
  
  
Line 82: Line 77:
 | ''204 No Content'' | The notes were saved | | ''204 No Content'' | The notes were saved |
 | ''400 Bad Request'' | Invalid notes. Please make sure that status is a valid JSON string with quotes. | | ''400 Bad Request'' | Invalid notes. Please make sure that status is a valid JSON string with quotes. |
-| ''404 Not Found'' | Application does not have this offer | 
- 
- 
-===== DELETE ===== 
- 
-Delete the notes on this offer. 
- 
-==== Syntax ==== 
- 
-  DELETE /api/applications/123/offers/321/notes 
-  Host: apply.example.edu 
-  Authorization: DREAM apikey="..." 
- 
- 
-==== Response headers ==== 
- 
-  Content-Type: text/plain 
-  Content-Length: 0 
- 
-==== Response codes ==== 
- 
-| ''204 No Content'' | The notes were deleted | 
 | ''404 Not Found'' | Application does not have this offer | | ''404 Not Found'' | Application does not have this offer |