Skip to content
Navigation

List tasks

GET
https://api.nicer.travel/crm/tasks

Lists open tasks of exactly one of: the caller (assignedUserId=me), another person (their user id, for an admin), one traveler (travelerId) or one trip (travelersTripId). completed=true lists the done ones instead. 50 a page unless limit says otherwise, each page soonest first and the undated last; send the answer's nextToken back to read the next page, until it is null. Each task names what it is about: travelerName, or tripName with the trip's associatedTripItineraryId. Errors: 400 ERROR_INVALID_QUERY for none or more than one of assignedUserId, travelerId and travelersTripId, a value out of range or a nextToken of another list; 403 ERROR_UNAUTHORIZED for another person's tasks unless the caller is an admin; 404 ERROR_ITEM_NOT_FOUND for a traveler or trip the caller may not see.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Query parameters

  • assignedUserId
    optional
    string

    A person's tasks: their user id, or me for yours. Send exactly one of assignedUserId, travelerId and travelersTripId.

    minLength: 1
  • completed
    optional
    string

    true lists the done tasks instead of the open ones; false, or left out, the open ones.

  • limit
    optional
    integer

    How many tasks a page holds, 1 to 100; 50 when left out.

    maximum: 100 · minimum: 1
  • nextToken
    optional
    string

    The nextToken of the page before, to read the next one; left out for the first page.

    minLength: 1
  • travelerId
    optional
    string

    A traveler's tasks (TRV…). Send exactly one of assignedUserId, travelerId and travelersTripId.

    maxLength: 64 · minLength: 1
  • travelersTripId
    optional
    string

    A trip's tasks (TT…). Send exactly one of assignedUserId, travelerId and travelersTripId.

    minLength: 1

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"

Returns

200

OK

JSON
  • items
    array of
    object
    required

    The items of this page.

    • 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))$
  • nextToken
    required

    Send it back as nextToken to read the next page; null on the last page.

    Any of the following:

    • string
    • null

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