How to submit homework

To show the client how to submit their homework

The client can complete the homework assigned to them by their Care Provider. To Submit homework, follow these steps:

1- Request URL:

https://gwidev.eq.optt.ca/gateway/profile/client/session/assignment/submit

2- Request Method Type:
PUT

3- Body

{
  "answers": [
    {
      "answer": "string",
      "highlights": [
        {
          "text": "string",
          "value": 0
        }
      ],
      "metadata": "string",
      "questionText": "string"
    }
  ],
  "assignmentId": 1858,
  "id": 0,
  "metadata": "string",
  "saveType": "DRAFT",
  "submitDate": "string"
}

3- Body Description

Parameter NameParameter TypeDescription
answerstringThe answers to homework questions
textstringHighlighted text in the AI module
valuestringThe number obtained from the َAI module
questionTextstringHomework question texts
assignmentIdintegerHomework Id
idintegerAnswer id
saveTypestringDRAFT, AUTO_SAVE, FINAL
submitDatestring

A complete example of an API call:

curl -X POST "https://gwidev.eq.optt.ca/gateway/profile/client/session/assignment/submit" -H "accept: */*" -H "Authorization: bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjM3NTgyMDY0ODksInVzZXJfbmFtZSI6ImxhbGVoQGNpdHJvbml0eS5jb20iLCJhdXRob3JpdGllcyI6WyJDTElFTlQiXSwianRpIjoiNGNhZTIyMDQtMWNkNi00NTJmLWFmOGItYjc0NWZkMjdmMGYxIiwiY2xpZW50X2lkIjoib3B0dC0wMmVlNzdkYy1hYzQ1LTQzNDQtODE3ZS0xN2NhNTJiNThiNWQiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXX0.PON3BpI5KnDGxNHV3G-SfMiWDTcb2SQJJ5m5Mr9fKep_AMLSeJIeZzpnH6QSI2p_jgsaPZk9KYid7KJnfnjgLDYlQYQxj2fhvdyOkl6UY4OVwe1Vgr-3Zh6hibwDrrCcGUWQ_T3nTUTMyIpYGCAFck-Fz8EIxPj5MjOK2ImkFaqpIdfSFNRDV90IhdrR0qs0YptX9Hs6chP8EvQb_eJ4P-Hv5ZBT0WNvuzrcgflPqBjcge-eW0YO016ZqO15p-GPpHuqr-dSRFjciPG8RQhMytXZUAeHNXB9KtuFKMS9CDeD8bfHkl4bGjcdOdoTPWkfZ5Lj0RD393l-EmrrJ7ZZFA" -H "Content-Type: application/json" -d "{ \"answers\": [ { \"answer\": \"string\", \"highlights\": [ { \"text\": \"string\", \"value\": 0 } ], \"metadata\": \"string\", \"questionText\": \"string\" } ], \"assignmentId\": 1858, \"id\": 0, \"metadata\": \"string\", \"saveType\": \"DRAFT\", \"submitDate\": \"string\"}"

Response:

201:

access-control-allow-credentials: true 
 access-control-allow-origin: https://gwidev.eq.optt.ca 
 cache-control: max-age=1, no-cache 
 connection: keep-alive 
 content-length: 0 
 date: Mon, 25 Jan 2021 19:03:48 GMT 
 expires: Mon, 25 Jan 2021 19:03:49 GMT 
 location: /client/session/assignment/answer/504 
 pragma: no-cache 
 server: nginx/1.14.0 (Ubuntu) 
 vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Origin 
 x-content-type-options: nosniff 
 x-frame-options: DENY 
 x-xss-protection: 1; mode=block