---
agentTools:
  projectIndex: https://quiver.readme.io/llms.txt
---

# /tasks/{taskId}/attempts

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Task",
    "description": "Create and manage deliveries and store collections. For a collection, use the location's merchantLocationId and the QUIV_COL rate returned by /quotes. Store collection is stock-only in v1; select a location that has collection enabled and current stock for the full basket.",
    "version": "1.0"
  },
  "tags": [
    {
      "name": "TaskService"
    }
  ],
  "paths": {
    "/tasks/{taskId}/attempts": {
      "post": {
        "operationId": "TaskService_CreateTaskAttempt",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/taskTaskAttempt"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rpcStatus"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parentTaskAttemptId": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "taskAttemptType": {
                    "$ref": "#/components/schemas/taskTaskAttemptType"
                  },
                  "attemptNumber": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "status": {
                    "$ref": "#/components/schemas/taskTaskAttemptStatus"
                  },
                  "reviewNote": {
                    "type": "string"
                  },
                  "outcomeNote": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "TaskService"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.quiver.london/task"
    }
  ],
  "components": {
    "schemas": {
      "protobufAny": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        },
        "additionalProperties": {}
      },
      "rpcStatus": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/protobufAny"
            }
          }
        }
      },
      "taskTaskAttempt": {
        "type": "object",
        "properties": {
          "taskAttemptId": {
            "type": "integer",
            "format": "int32"
          },
          "taskId": {
            "type": "integer",
            "format": "int32"
          },
          "parentTaskAttemptId": {
            "type": "integer",
            "format": "int32"
          },
          "taskAttemptType": {
            "$ref": "#/components/schemas/taskTaskAttemptType"
          },
          "attemptNumber": {
            "type": "integer",
            "format": "int32",
            "description": "Numbered within the attempt type, so Ops can read \"Delivery attempt 1\"\nand, if needed later, \"Recovery attempt 2\"."
          },
          "status": {
            "$ref": "#/components/schemas/taskTaskAttemptStatus"
          },
          "reviewNote": {
            "type": "string"
          },
          "outcomeNote": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "taskTaskAttemptStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "IN_PROGRESS",
          "COMPLETED",
          "FAILED",
          "CANCELLED"
        ]
      },
      "taskTaskAttemptType": {
        "type": "string",
        "enum": [
          "DELIVERY",
          "RECOVERY",
          "RE_DELIVERY"
        ],
        "description": "A durable operational leg of a task. It is intentionally distinct from a\ncourier job: one attempt can have one or more courier jobs, while attempts\npreserve the reviewed history of a delivery, recovery, or re-delivery."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 231,
      "2": 25,
      "3": 199,
      "4": 19,
      "5": 95,
      "6": 86,
      "7": 0,
      "8": 65,
      "9": 210,
      "10": 115,
      "11": 26
    }
  }
}
```