Skip to content

Change a task's status

Open .md

PUT/v2/api/store/{team_slug}/v2/work_pipeline/{hash_id}/status

v2Operation ID v2_public_job_work_pipeline_change_status

Moves a task to another status of its task preset. Returns the task with previous_status_id and previous_status.

Completing every task doesn't change the job's status: change it with Change a job's status.

Permission

Any member of the team.

Business rules

  • The status must belong to the task's preset: otherwise 422 invalid_status_selection ("Selected status is not part of task preset").

Side effects

  • Sends the work_pipeline.status_changed webhook when the status really changed, and records the status history and status_last_change_date (and status_completion_date for a Completed status).

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team
  • hash_idstringrequired

    The task's hash id. Hash ids only: a unique key or a document number gives 404.

    • Example hpioY1gDBQZdbI

Request body

application/json, required.

  • status_idstringrequired

    A status of the task's preset (from List task statuses).

  • notify_customerboolean | null

    Accepted and ignored.

Response

200Successful response.

  • dataobjectrequired

    The task after the change, with the status it had before.

    Child fields (26)
    • assigned_usersarray of objects

      Who is assigned.

      Fields of each item (3)
    • created_atstring (date-time)
    • due_datestring (date-time) | null

      Task due date. ISO 8601 with offset, or null.

    • idstring

      The task.

    • job_idstring

      The job.

    • job_is_rushboolean | integer | null
    • job_item_countnumber | null
    • job_namestring | null
    • The job number with its prefix.

    • job_status_idstring | null

      The job's current status.

    • namestring
    • notestring | null
    • order_idstring

      The order.

    • order_namestring | null
    • order_scoped_idstring | null

      The order number.

    • The task preset it comes from.

    • positioninteger

      Order among tasks; lower comes first. 0 when unset.

    • A status: label, kind and place in the list.

      Child fields (9)
      • colorstring | null

        Hex color.

      • idstring

        The status.

      • labelstring
      • Only on the statuses of a task preset (role pipeline): the task preset. Absent on other statuses.

      • positioninteger

        Its place in the team's list: sort by it to find the next status.

      • rolestring

        Which list it belongs to: job for job statuses, pipeline for the statuses of a task preset.

        • One of: "order", "quote", "job", "purchase_order", "shipment", "customer_message", "pipeline"
      • trashedboolean

        The status was deleted.

      • typestring

        The kind of status: start (Pending), pre_production and in_progress (In Progress), end (Completed).

        • One of: "start", "pre_production", "in_progress", "end"
    • previous_status_idstring | null

      The status before this call.

    • A summary of the job's order.

      Child fields (14)
    • start_datestring (date-time) | null

      Task start. ISO 8601 with offset, or null.

    • statusobject

      A status: label, kind and place in the list.

    • status_completion_datestring (date-time) | null

      When it reached a Completed status. ISO 8601 with offset, or null.

    • status_idstring

      The task's status (a status of its task preset).

    • status_last_change_datestring (date-time) | null

      When the status last changed. ISO 8601 with offset, or null.

    • updated_atstring (date-time)
  • statusintegerrequired
  • successbooleanrequired

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

    When
    The task or the status isn't your team's.
    Fix
    Check the ids.
  • 422The request was refused and changed nothing. validation_failed lists what to fix in error.fields; other codes name a business rule, explained in error.message. A few checks answer with only {"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer connect_timeout ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.

    When
    The status is from another preset (invalid_status_selection), or status_id is missing.
    Fix
    Use a status of the task's preset.