API reference › Assignments › Provider portal
Mark assignment as complete
POST /v1/settings/portal/provider/assignment/assignment-complete/{id}
- Scope
assignments:write- Roles
- service-provider
Allows the service provider assigned to an assignment or shift to mark their part of it as completed. A provider with no assigned row on this work item gets 403.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
id required | string | Unique identifier of the assignment to mark as complete. Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl -X POST "https://api.fetchfido.ai/v1/settings/portal/provider/assignment/assignment-complete/{id}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Assignment marked as complete successfully
Assignment marked as complete successfully
{
"success": true,
"message": "Assignment Morning interpreting (ASG-23RT45) was marked as complete.",
"data": null
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | ':entity :name (:id) was marked as complete.' — entity is Assignment or Shift, name is the title (the id when it has none) Example |
data | object or null |
400 Bad request
Assignment cannot be marked as complete. Two cases, each with its own message/errors pair: already completed ('This assignment has already been completed.' / 'Action not allowed'); before the scheduled end time ('Action not allowed' / 'You can complete the assignment only after the scheduled end time.').
{
"success": false,
"message": "Action not allowed",
"errors": "You can complete the assignment only after the scheduled end time.",
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string | Example |
code | string | Example |
401 Not signed in
Unauthorized - Authentication required
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
The caller is not an assigned provider on this assignment or shift, or no work item has this id
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'assignments:write' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
The work item requires verified time documentation and the caller's sign-in/sign-out is incomplete. errors.missing_fields lists the empty check-in fields — all eight when the caller has no check-in at all.
{
"success": false,
"message": "Sign in & out fields are required.",
"errors": {
"missing_fields": [
"sign_out_date",
"sign_out_time",
"sign_out_sign",
"sign_out_by"
]
},
"code": ""
}Response fields (5)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | object | |
errors.missing_fields | array of string | |
code | string | Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Internal Server Error
{
"success": false,
"message": "Failed to complete assignment"
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |