Substy Developers
Team

List completed team schedules

List completed agency work schedules within the requested date range.

GET/v1/agencies/{agencyId}/team/completed-schedules

List completed agency work schedules within the requested date range.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

agencyId*string
Length1 <= length

Query Parameters

startDate?string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
endDate?string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/agencies/string/team/completed-schedules" \  -H "Authorization: Bearer YOUR_API_KEY"
{  "data": [    {      "timeSlots": [        {          "id": "string",          "createdAt": "2019-08-24T14:15:22Z",          "updatedAt": "2019-08-24T14:15:22Z",          "startTime": "string",          "endTime": "string",          "position": 0,          "dayOfWeek": null,          "scheduleId": "string"        }      ],      "creators": [        {          "creator": {            "platform": "ONLYFANS",            "id": "string",            "name": "string"          },          "creatorId": "string",          "scheduleId": "string",          "assignedAt": "2019-08-24T14:15:22Z"        }      ],      "employees": [        {          "agencyEmployee": {            "id": "string",            "color": null,            "employeeId": "string"          },          "scheduleId": "string",          "assignedAt": "2019-08-24T14:15:22Z",          "agencyEmployeeId": "string"        }      ],      "scheduleDates": [        {          "date": "2019-08-24T14:15:22Z",          "id": "string",          "createdAt": "2019-08-24T14:15:22Z",          "scheduleId": "string"        }      ],      "shiftReports": [        {          "creatorReports": [            {              "creatorId": "string",              "id": "string",              "createdAt": "2019-08-24T14:15:22Z",              "revenue": "string",              "paidMessages": 0,              "paidMessageValue": "string",              "shiftReportId": "string",              "tips": 0,              "tipAmount": "string"            }          ],          "employeeReports": [            {              "id": "string",              "createdAt": "2019-08-24T14:15:22Z",              "revenue": "string",              "agencyEmployeeId": "string",              "avgResponseTime": null,              "shiftReportId": "string",              "hoursWorked": 0,              "messagesHandled": 0            }          ],          "id": "string",          "createdAt": "2019-08-24T14:15:22Z",          "updatedAt": "2019-08-24T14:15:22Z",          "conversionRate": null,          "scheduleId": "string",          "shiftDate": "2019-08-24T14:15:22Z",          "actualStart": "2019-08-24T14:15:22Z",          "actualEnd": "2019-08-24T14:15:22Z",          "totalMessages": 0,          "totalRevenue": "string",          "totalTips": 0,          "totalTipAmount": "string",          "paidMessages": 0,          "paidMessageValue": "string",          "avgResponseTime": null        }      ],      "id": "string",      "createdAt": "2019-08-24T14:15:22Z",      "status": "COMPLETED",      "timezone": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "scheduledFor": "AI",      "isAllDay": true,      "isRecurring": true,      "recurrenceType": null,      "recurrenceEnd": null,      "color": null,      "isCompleted": true,      "completedAt": null,      "lastOccurrenceStart": null    }  ],  "meta": {    "requestId": "string"  }}