---
agentTools:
  projectIndex: https://docs.qdelivery.app/llms.txt
---

# Update Status

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Integration",
    "version": "1.6.1"
  },
  "servers": [
    {
      "url": "https://api.dev.qdelivery.app/api/integration"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/task-status/{task}": {
      "patch": {
        "summary": "Update Status",
        "description": "",
        "operationId": "update-status",
        "parameters": [
          {
            "name": "task",
            "in": "path",
            "description": "Task ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status_id"
                ],
                "properties": {
                  "status_id": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "notes": {
                    "type": "string",
                    "description": "Max: 255"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"id\": 19,\n\t\"integration_id\": \"22\",\n\t\"tracking_code\": \"QD1-22142U0ZQ0K\",\n\t\"type_slug\": \"assignable\",\n\t\"obligation_slug\": \"mandatory\",\n\t\"status_id\": 8,\n\t\"status_category_slug\": \"failed\",\n\t\"plan_id\": null,\n\t\"company_id\": 1,\n\t\"owner_id\": 2,\n\t\"courier_id\": null,\n\t\"team_id\": null,\n\t\"hub_id\": 1,\n\t\"origin_hub_id\": 1,\n\t\"destination_hub_id\": 2,\n\t\"origin_address\": \"Kozyatağı Mah, Şakacı Sk. Selimoğlu Residence No:14\\/1-A, 34742 Kadıköy\\/İstanbul\",\n\t\"origin_address_building\": null,\n\t\"origin_address_floor\": null,\n\t\"origin_address_apartment\": null,\n\t\"origin_phone\": null,\n\t\"origin_phone_country\": null,\n\t\"origin_name\": \"Anadolu Depo\",\n\t\"origin_lat\": 40.971301,\n\t\"origin_lng\": 29.094388,\n\t\"destination_address\": \"Vişnezade, Hüsrev Gerede Cd. No:15, 34357 Beşiktaş\\/İstanbul\",\n\t\"destination_address_building\": null,\n\t\"destination_address_floor\": null,\n\t\"destination_address_apartment\": null,\n\t\"destination_phone\": null,\n\t\"destination_phone_country\": null,\n\t\"destination_name\": \"Avrupa Mağazası\",\n\t\"destination_lat\": 41.046089,\n\t\"destination_lng\": 28.99963,\n\t\"is_origin_resolved\": false,\n\t\"is_destination_resolved\": false,\n\t\"slot\": \"2022041510001200\",\n\t\"starts_at\": \"2022-02-04T10:00:00.000000Z\",\n\t\"ends_at\": \"2022-02-04T10:11:00.000000Z\",\n\t\"quantity\": 1,\n\t\"service_time\": 0,\n\t\"response_time\": 0,\n\t\"requires_delivery_code\": false,\n\t\"requires_delivery_code_mandatory\": false,\n\t\"requires_pod_photo\": false,\n\t\"requires_pod_photo_mandatory\": false,\n\t\"requirements_delivery_code\": null,\n\t\"requirements_pod_photo\": null,\n\t\"notes\": null,\n\t\"recipient_notes\": null,\n\t\"channel\": \"api\",\n\t\"provider_id\": null,\n\t\"status_at\": \"2022-05-23T15:03:41.000000Z\",\n\t\"seen_at\": null,\n\t\"claimed_at\": null,\n\t\"created_at\": \"2022-05-23T07:36:09.000000Z\",\n\t\"updated_at\": \"2022-05-23T15:03:41.000000Z\",\n\t\"route_order\": 0,\n\t\"priority\": 0,\n\t\"contents\": [],\n\t\"payment_type\": null,\n\t\"foreign_carrier\": null,\n\t\"handled_by_foreign_carrier\": false,\n\t\"rating\": 0,\n\t\"comment\": null,\n\t\"distance\": 20941,\n\t\"duration\": 2312,\n\t\"was_finalized_duly\": true,\n\t\"was_delayed\": false,\n\t\"started_at\": null,\n\t\"ended_at\": null,\n\t\"requirements_pod_photo_url\": null,\n\t\"team\": null,\n\t\"hub\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Anadolu Depo\",\n\t\t\"address\": \"Kozyatağı Mah, Şakacı Sk. Selimoğlu Residence No:14\\/1-A, 34742 Kadıköy\\/İstanbul\",\n\t\t\"address_building\": null,\n\t\t\"address_apartment\": null,\n\t\t\"address_floor\": null,\n\t\t\"lat\": 40.971301,\n\t\t\"lng\": 29.094388,\n\t\t\"teams_count\": null,\n\t\t\"created_at\": \"2022-05-09T09:49:46.000000Z\",\n\t\t\"updated_at\": \"2022-05-11T09:35:25.000000Z\",\n\t\t\"teams\": [\n\t\t\t{\n\t\t\t\t\"id\": 4,\n\t\t\t\t\"hub_id\": 1,\n\t\t\t\t\"name\": \"Anadolu Depo\",\n\t\t\t\t\"couriers_count\": null,\n\t\t\t\t\"tags\": [],\n\t\t\t\t\"created_at\": \"2022-05-09T09:49:46.000000Z\",\n\t\t\t\t\"updated_at\": \"2022-05-09T09:49:46.000000Z\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": 6,\n\t\t\t\t\"hub_id\": 1,\n\t\t\t\t\"name\": \"Anadolu Takımı\",\n\t\t\t\t\"couriers_count\": null,\n\t\t\t\t\"tags\": [],\n\t\t\t\t\"created_at\": \"2022-05-09T09:49:46.000000Z\",\n\t\t\t\t\"updated_at\": \"2022-05-09T09:49:46.000000Z\"\n\t\t\t}\n\t\t],\n\t\t\"tags\": []\n\t},\n\t\"status\": {\n\t\t\"id\": 8,\n\t\t\"name\": \"Başarısız\"\n\t},\n\t\"status_logs\": [\n\t\t{\n\t\t\t\"id\": 70,\n\t\t\t\"task_id\": 19,\n\t\t\t\"courier_id\": 250,\n\t\t\t\"status_id\": 3,\n\t\t\t\"status_category_slug\": \"assigned\",\n\t\t\t\"notes\": null,\n\t\t\t\"lat\": null,\n\t\t\t\"lng\": null,\n\t\t\t\"latlng\": null,\n\t\t\t\"geohash\": null,\n\t\t\t\"created_at\": \"2022-05-23T07:36:09.000000Z\",\n\t\t\t\"updated_at\": \"2022-05-23T07:36:09.000000Z\",\n\t\t\t\"role_slug\": \"customer\",\n\t\t\t\"user_id\": 2,\n\t\t\t\"channel\": \"api\",\n\t\t\t\"status\": {\n\t\t\t\t\"id\": 3,\n\t\t\t\t\"status_category_slug\": \"assigned\",\n\t\t\t\t\"name\": \"Atandı\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": 71,\n\t\t\t\"task_id\": 19,\n\t\t\t\"courier_id\": 250,\n\t\t\t\"status_id\": 7,\n\t\t\t\"status_category_slug\": \"cancelled\",\n\t\t\t\"notes\": null,\n\t\t\t\"lat\": null,\n\t\t\t\"lng\": null,\n\t\t\t\"latlng\": null,\n\t\t\t\"geohash\": null,\n\t\t\t\"created_at\": \"2022-05-23T15:02:52.000000Z\",\n\t\t\t\"updated_at\": \"2022-05-23T15:02:52.000000Z\",\n\t\t\t\"role_slug\": \"customer\",\n\t\t\t\"user_id\": 2,\n\t\t\t\"channel\": \"api\",\n\t\t\t\"status\": {\n\t\t\t\t\"id\": 7,\n\t\t\t\t\"status_category_slug\": \"cancelled\",\n\t\t\t\t\"name\": \"İptal\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": 72,\n\t\t\t\"task_id\": 19,\n\t\t\t\"courier_id\": null,\n\t\t\t\"status_id\": 8,\n\t\t\t\"status_category_slug\": \"failed\",\n\t\t\t\"notes\": null,\n\t\t\t\"lat\": null,\n\t\t\t\"lng\": null,\n\t\t\t\"latlng\": null,\n\t\t\t\"geohash\": null,\n\t\t\t\"created_at\": \"2022-05-23T15:03:41.000000Z\",\n\t\t\t\"updated_at\": \"2022-05-23T15:03:41.000000Z\",\n\t\t\t\"role_slug\": \"customer\",\n\t\t\t\"user_id\": 2,\n\t\t\t\"channel\": \"api\",\n\t\t\t\"status\": {\n\t\t\t\t\"id\": 8,\n\t\t\t\t\"status_category_slug\": \"failed\",\n\t\t\t\t\"name\": \"Başarısız\"\n\t\t\t}\n\t\t}\n\t],\n\t\"tags\": []\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 19,
                      "default": 0
                    },
                    "integration_id": {
                      "type": "string",
                      "example": "22"
                    },
                    "tracking_code": {
                      "type": "string",
                      "example": "QD1-22142U0ZQ0K"
                    },
                    "type_slug": {
                      "type": "string",
                      "example": "assignable"
                    },
                    "obligation_slug": {
                      "type": "string",
                      "example": "mandatory"
                    },
                    "status_id": {
                      "type": "integer",
                      "example": 8,
                      "default": 0
                    },
                    "status_category_slug": {
                      "type": "string",
                      "example": "failed"
                    },
                    "plan_id": {},
                    "company_id": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "owner_id": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "courier_id": {},
                    "team_id": {},
                    "hub_id": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "origin_hub_id": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "destination_hub_id": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "origin_address": {
                      "type": "string",
                      "example": "Kozyatağı Mah, Şakacı Sk. Selimoğlu Residence No:14/1-A, 34742 Kadıköy/İstanbul"
                    },
                    "origin_address_building": {},
                    "origin_address_floor": {},
                    "origin_address_apartment": {},
                    "origin_phone": {},
                    "origin_phone_country": {},
                    "origin_name": {
                      "type": "string",
                      "example": "Anadolu Depo"
                    },
                    "origin_lat": {
                      "type": "number",
                      "example": 40.971301,
                      "default": 0
                    },
                    "origin_lng": {
                      "type": "number",
                      "example": 29.094388,
                      "default": 0
                    },
                    "destination_address": {
                      "type": "string",
                      "example": "Vişnezade, Hüsrev Gerede Cd. No:15, 34357 Beşiktaş/İstanbul"
                    },
                    "destination_address_building": {},
                    "destination_address_floor": {},
                    "destination_address_apartment": {},
                    "destination_phone": {},
                    "destination_phone_country": {},
                    "destination_name": {
                      "type": "string",
                      "example": "Avrupa Mağazası"
                    },
                    "destination_lat": {
                      "type": "number",
                      "example": 41.046089,
                      "default": 0
                    },
                    "destination_lng": {
                      "type": "number",
                      "example": 28.99963,
                      "default": 0
                    },
                    "is_origin_resolved": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "is_destination_resolved": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "slot": {
                      "type": "string",
                      "example": "2022041510001200"
                    },
                    "starts_at": {
                      "type": "string",
                      "example": "2022-02-04T10:00:00.000000Z"
                    },
                    "ends_at": {
                      "type": "string",
                      "example": "2022-02-04T10:11:00.000000Z"
                    },
                    "quantity": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "service_time": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "response_time": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "requires_delivery_code": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "requires_delivery_code_mandatory": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "requires_pod_photo": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "requires_pod_photo_mandatory": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "requirements_delivery_code": {},
                    "requirements_pod_photo": {},
                    "notes": {},
                    "recipient_notes": {},
                    "channel": {
                      "type": "string",
                      "example": "api"
                    },
                    "provider_id": {},
                    "status_at": {
                      "type": "string",
                      "example": "2022-05-23T15:03:41.000000Z"
                    },
                    "seen_at": {},
                    "claimed_at": {},
                    "created_at": {
                      "type": "string",
                      "example": "2022-05-23T07:36:09.000000Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2022-05-23T15:03:41.000000Z"
                    },
                    "route_order": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "priority": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "contents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "payment_type": {},
                    "foreign_carrier": {},
                    "handled_by_foreign_carrier": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "rating": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "comment": {},
                    "distance": {
                      "type": "integer",
                      "example": 20941,
                      "default": 0
                    },
                    "duration": {
                      "type": "integer",
                      "example": 2312,
                      "default": 0
                    },
                    "was_finalized_duly": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "was_delayed": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "started_at": {},
                    "ended_at": {},
                    "requirements_pod_photo_url": {},
                    "team": {},
                    "hub": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "name": {
                          "type": "string",
                          "example": "Anadolu Depo"
                        },
                        "address": {
                          "type": "string",
                          "example": "Kozyatağı Mah, Şakacı Sk. Selimoğlu Residence No:14/1-A, 34742 Kadıköy/İstanbul"
                        },
                        "address_building": {},
                        "address_apartment": {},
                        "address_floor": {},
                        "lat": {
                          "type": "number",
                          "example": 40.971301,
                          "default": 0
                        },
                        "lng": {
                          "type": "number",
                          "example": 29.094388,
                          "default": 0
                        },
                        "teams_count": {},
                        "created_at": {
                          "type": "string",
                          "example": "2022-05-09T09:49:46.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2022-05-11T09:35:25.000000Z"
                        },
                        "teams": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 4,
                                "default": 0
                              },
                              "hub_id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Anadolu Depo"
                              },
                              "couriers_count": {},
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {}
                                }
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2022-05-09T09:49:46.000000Z"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2022-05-09T09:49:46.000000Z"
                              }
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        }
                      }
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 8,
                          "default": 0
                        },
                        "name": {
                          "type": "string",
                          "example": "Başarısız"
                        }
                      }
                    },
                    "status_logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 70,
                            "default": 0
                          },
                          "task_id": {
                            "type": "integer",
                            "example": 19,
                            "default": 0
                          },
                          "courier_id": {
                            "type": "integer",
                            "example": 250,
                            "default": 0
                          },
                          "status_id": {
                            "type": "integer",
                            "example": 3,
                            "default": 0
                          },
                          "status_category_slug": {
                            "type": "string",
                            "example": "assigned"
                          },
                          "notes": {},
                          "lat": {},
                          "lng": {},
                          "latlng": {},
                          "geohash": {},
                          "created_at": {
                            "type": "string",
                            "example": "2022-05-23T07:36:09.000000Z"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2022-05-23T07:36:09.000000Z"
                          },
                          "role_slug": {
                            "type": "string",
                            "example": "customer"
                          },
                          "user_id": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "channel": {
                            "type": "string",
                            "example": "api"
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3,
                                "default": 0
                              },
                              "status_category_slug": {
                                "type": "string",
                                "example": "assigned"
                              },
                              "name": {
                                "type": "string",
                                "example": "Atandı"
                              }
                            }
                          }
                        }
                      }
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6602b1495613fc002042a788:6602b14a5613fc002042a7bf"
}
```