URL: {{url}}/api/email/subscribedManagers/
Request Type: GET
Description: Get list of all subscribed managers
Response Body:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"member": {
"username": "ankit",
"email": "ak308@duke.edu"
}
}
]
}
URL: {{url}}/api/email/subscribe/
Request Type: POST
Description: Subscribe to the system (subscribed manager list)
Request Body: None
Response Body:
{
"id": 2,
"member": {
"username": "ankit",
"email": "ak308@duke.edu"
}
}
URL: {{url}}/api/email/unsubscribe/
Request Type: POST
Description: Unsubscribe from the system
Request Body: None
Response Body: None
Note: Successful request will return status of 200 - OK
URL: {{url}}/api/email/subjectTag/
Request Type: GET
Description: Get the current value of the subject tag
Response Body:
{
"id": 1,
"subject_tag": "ECE 458"
}
URL: {{url}}/api/email/prependedBody/
Request Type: GET
Description: Get value of prepended body
Response Body:
{
"id": 1,
"prepended_body": "This is a prepended body"
}
URL: {{url}}/api/email/prependedBody/modify/
Request Type: PATCH
Description: Modify value of prepended body
Request Body:
{
"prepended_body": "prepended body"
}
Response Body:
{
"id": 1,
"prepended_body": "prepended body"
}
URL: {{url}}/api/email/loanReminderDates/modify/
Request Type: POST
Description: Modify the loan reminder email schedule dates (note: when using this request, all of the loan reminder dates are resent, as opposed to just the ones that are updated. This is to make updating the database easier)
Request Body:
[
{
"date": "2017-4-17"
},
{
"date": "2017-4-26"
}
]
Response Body:
[
{
"id": 3,
"date": "2017-04-17",
"executed": false
},
{
"id": 4,
"date": "2017-04-26",
"executed": false
}
]
URL: {{url}}/api/email/subscribedManagers/ Request Type: GET Description: Get list of all subscribed managers Response Body: { "count": 1, "next": null, "previous": null, "results": [ { "id": 2, "member": { "username": "ankit", "email": "ak308@duke.edu" } } ] }
URL: {{url}}/api/email/subscribe/ Request Type: POST Description: Subscribe to the system (subscribed manager list) Request Body: None Response Body: { "id": 2, "member": { "username": "ankit", "email": "ak308@duke.edu" } }
URL: {{url}}/api/email/unsubscribe/ Request Type: POST Description: Unsubscribe from the system Request Body: None Response Body: None Note: Successful request will return status of 200 - OK
URL: {{url}}/api/email/subjectTag/ Request Type: GET Description: Get the current value of the subject tag Response Body: { "id": 1, "subject_tag": "ECE 458" }
URL: {{url}}/api/email/subjectTag/modify/ Request Type: PATCH Description: Modify subject tag Request Body: { "subject_tag": "ECE Inventory System" } Response Body: { "id": 1, "subject_tag": "ECE Inventory System" }
URL: {{url}}/api/email/prependedBody/ Request Type: GET Description: Get value of prepended body Response Body: { "id": 1, "prepended_body": "This is a prepended body" }
URL: {{url}}/api/email/prependedBody/modify/ Request Type: PATCH Description: Modify value of prepended body Request Body: { "prepended_body": "prepended body" } Response Body: { "id": 1, "prepended_body": "prepended body" }
URL: {{url}}/api/email/loanReminderDates/ Request Type: GET Description: Get all scheduled loan reminder email dates Response Body: { "count": 2, "next": null, "previous": null, "results": [ { "id": 1, "date": "2017-04-16", "executed": false }, { "id": 2, "date": "2017-04-25", "executed": false } ] }
URL: {{url}}/api/email/loanReminderDates/modify/ Request Type: POST Description: Modify the loan reminder email schedule dates (note: when using this request, all of the loan reminder dates are resent, as opposed to just the ones that are updated. This is to make updating the database easier) Request Body: [ { "date": "2017-4-17" }, { "date": "2017-4-26" } ] Response Body: [ { "id": 3, "date": "2017-04-17", "executed": false }, { "id": 4, "date": "2017-04-26", "executed": false } ]