Skip to content
Navigation

Update a task

PUT
https://api.nicer.travel/crm/tasks/{taskId}

Changes a task: its title, notes, date or assignee, or marks it done. Errors: 400 ERROR_BODY_VALIDATION, 404 ERROR_ITEM_NOT_FOUND.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • taskId
    string
    required

Header parameters

  • x-nicer-company
    string
    required

    Company context. Authentication and tenant membership are validated by the API.

  • X-Nicer-CRM-Contract
    resource
    required
    example: "resource"

Request body JSON required

  • assignedUserId
    optional

    The user id of the advisor or admin who should do it; null assigns nobody.

    Any of the following:

    • string
    • null
  • completed
    optional
    boolean

    True marks the task done, false reopens it.

  • notes
    optional

    More about it, 1 to 2,000 characters once trimmed; null clears it.

    Any of the following:

    • string
    • null
  • tentativeDate
    optional

    When it should be done, as YYYY-MM-DD; null leaves it undated.

    Any of the following:

    • string
    • null
  • title
    optional
    string

    What to do, in a few words: 1 to 255 characters once trimmed.

    maxLength: 255 · minLength: 1

Returns

200

OK

JSON
  • assignedUserId
    required

    The advisor or admin who should do it; null when nobody is assigned.

    Any of the following:

    • string
    • null
  • associatedTripItineraryId
    required

    The itinerary (TI…) of the trip the task is about, when it has one; null otherwise.

    Any of the following:

    • string
    • null
  • companyName
    string
    required

    The agency the task belongs to.

  • completed
    boolean
    required

    Whether the task is done.

  • completedAt
    required

    When the task was marked done; null while it is open.

    Any of the following:

    • string
    • null
  • createdAt
    string
    required

    When the task was created.

    format: date-time · pattern: ^(?:(?:\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))$
  • createdBy
    string
    required

    The user id of who created it, or SYSTEM for the CRM.

  • lastModifiedBy
    string
    required

    The user id of who changed it last, or SYSTEM for the CRM.

  • notes
    required

    More about it; null when there is none.

    Any of the following:

    • string
    • null
  • origin
    ANNIVERSARY
    or
    BIRTHDAY
    or
    DOCUMENT_EXPIRY
    or
    MANUAL
    or
    TEMPLATE
    required

    How the task was made.

  • taskId
    string
    required

    The task's id: what updateTask and deleteTask take.

  • tentativeDate
    required

    When it should be done, as a date; null when undated.

    Any of the following:

    • string
    • null
  • title
    string
    required

    What to do, in a few words.

  • travelerId
    required

    The traveler the task is about; null for a task about a trip. A task is about one traveler or one trip.

    Any of the following:

    • TravelerId
    • null
  • travelerName
    required

    The traveler's name as the agency knows them, read when the task is answered; null for a task about a trip.

    Any of the following:

    • string
    • null
  • travelersTripId
    required

    The trip (TT…) the task is about; null for a task about a traveler.

    Any of the following:

    • string
    • null
  • tripName
    required

    The trip's name, read when the task is answered; null for a task about a traveler or a trip without a name.

    Any of the following:

    • string
    • null
  • updatedAt
    string
    required

    When the task last changed.

    format: date-time · pattern: ^(?:(?:\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))$

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close