Groups

Groups represent a set of jobs that are grouped together. It allows to manage the jobs in a more organized way.

The Group object

Properties

  • idstring

    Unique identifier for the object.

  • namestring

    The name of the group.

  • archivedboolean

    True if the entity is archived.

  • budgetobject

    The budget of the group.

  • clientobject

    The client.
  • colorstring

    The color of the group.

  • currencyobject

    The currency.
  • domainobject

    The domain of expertise.
  • dueDatedate

    The due date of the group.

  • dueDateAutoboolean

    True if the due date is automatically set based on the due dates of the jobs.

  • estimationembedded

    The estimation of the group.

  • externalReferencestring

    The external reference.

  • filesarray

    The files.
  • groupOnInvoiceboolean

    True if all the jobs of the group are grouped on one line on the invoice.

  • jobsarray

    The list of job ids in the group.

  • labelsarray

    The labels.
  • notesarray

    The notes linked to the entity.
  • pinnedboolean

    True if the entity is pinned.

  • progressnumber

    The progress of the group based on the jobs.

  • purchaseOrderstring

    The purchase order.

  • servicesarray

    The services in the group.
  • statusnumber

    The status of the group. Valid values are: 1 (not started), 2 (in progress), 3 (finished), 4 (invoiced), 5 (cancelled), 6 (on hold).

  • suppliersarray

    The suppliers in the group.
  • usersarray

    The users in the group
  • createdAtdate

    The date and time the entity was created.

  • updatedAtdate

    The date and time the entity was last updated.

Group object

{
  "id": "670d0e6d077d755ddaa9b132",
  "name": "Demo group",
  "archived": false,
  "budget": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    }
  },
  "client": {
    "id": "66f1313f9e477f90664d1ad8",
    "name": "Google"
  },
  "color": "#991b1b",
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "dueDate": "2024-10-14T13:00:00.000Z",
  "dueDateAuto": true,
  "estimation": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "outsourcing": {
      "suppliers": [],
      "totals": []
    },
    "profitability": {
      "status": "incorrectStatus",
      "withMargin": {
        "status": "incorrectStatus"
      }
    },
    "total": 160,
    "totalInvoiced": 0,
    "totalTime": 0
  },
  "externalReference": "test",
  "files": [],
  "groupOnInvoice": false,
  "jobs": [
    "670d0e8a077d755ddaa9b139"
  ],
  "labels": [],
  "notes": [],
  "pinned": false,
  "progress": 0,
  "services": [
    {
      "id": "6548c16d5136b418fd626e5f",
      "name": "Translation"
    }
  ],
  "status": 1,
  "suppliers": [],
  "users": [
    {
      "id": "6548c11c5136b418fd626e2f",
      "name": "Cédric Doe"
    }
  ],
  "createdAt": "2024-10-14T12:28:29.083Z",
  "updatedAt": "2024-10-14T12:28:58.867Z"
}

GET/v2/groups

List all groups

This endpoint allows you to retrieve all the groups.

Filters

All the filters are optional and can be combined. See Pagination for the rules shared by all the list endpoints (multiple values, dates, keywords).

  • idstring

    Comma-separated list of group ids.

  • statusstring

    Comma-separated list of statuses: 1 (not started), 2 (in progress), 3 (finished), 4 (invoiced), 5 (cancelled), 6 (on hold).

  • namestring

    Only the groups whose name contains this text (not case sensitive).

  • externalReferencestring

    Only the groups whose external reference contains this text (not case sensitive).

  • purchaseOrderstring

    Only the groups whose purchase order contains this text (not case sensitive).

  • domain.idstring

    Comma-separated list of domain of expertise ids.

  • client.idstring

    Comma-separated list of client ids.

  • client.projectManager.idstring

    Comma-separated list of user ids. Only the groups whose project manager is one of these users are returned.

  • projectManager.idstring

    Comma-separated list of user ids. Only the groups of the clients managed by these users (project managers) are returned.

  • users.idstring

    Comma-separated list of user ids.

  • labels.idstring

    Comma-separated list of label ids. The groups that have at least one of these labels are returned (see labels.all).

  • labels.allboolean

    Set to true to return only the groups that have all the labels of labels.id.

  • archivedboolean

    true to retrieve only the archived groups, false to exclude them. If not provided, both are returned.

  • dueDateFromdate

    Only the groups whose due date is on or after this date (ISO 8601).

  • dueDateTodate

    Only the groups whose due date is before this date (ISO 8601).

  • currencystring

    The currency code (ISO, e.g., EUR).

Sorting

  • sortstring

    The field to sort by. One of: name, dueDate, externalReference, status, client.name, purchaseOrder, estimation.total. The default is dueDate.

  • directionstring

    The sort direction: asc or desc. The default is desc.

Request

GET
/v2/groups
curl -G https://api.lsp.expert/v2/groups \
  -u {key}: 

Response

{
  "items": [{
    "id": "670d0e6d077d755ddaa9b132",
    "name": "Demo group",
    "archived": false,
    "budget": {
      "currency": {
        "code": "EUR",
        "symbol": "€"
      }
    },
    "client": {
      "id": "66f1313f9e477f90664d1ad8",
      "name": "Google"
    },
    "color": "#991b1b",
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "dueDate": "2024-10-14T13:00:00.000Z",
    "dueDateAuto": true,
    "estimation": {
      "currency": {
        "code": "EUR",
        "symbol": "€"
      },
      "isV2": true,
      "outsourcing": {
        "suppliers": [],
        "totals": []
      },
      "profitability": {
        "status": "incorrectStatus",
        "withMargin": {
          "status": "incorrectStatus"
        }
      },
      "total": 160,
      "totalInvoiced": 0,
      "totalTime": 0
    },
    "externalReference": "test",
    "files": [],
    "groupOnInvoice": false,
    "jobs": [
      "670d0e8a077d755ddaa9b139"
    ],
    "labels": [],
    "notes": [],
    "object": "group",
    "pinned": false,
    "progress": 0,
    "services": [
      {
        "id": "6548c16d5136b418fd626e5f",
        "name": "Translation"
      }
    ],
    "status": 1,
    "suppliers": [],
    "users": [
      {
        "id": "6548c11c5136b418fd626e2f",
        "name": "Cédric Doe"
      }
    ],
    "createdAt": "2024-10-14T12:28:29.083Z",
    "updatedAt": "2024-10-14T12:28:58.867Z"
  },
  {...},
  {...}
],
  "pageSize": 20,
  "page": 1,
  "totalPages": 1,
  "totalItems": 2,
  "hasNextPage": false,
  "hasPreviousPage": false
}

POST/v2/groups

Create a group

This endpoint allows you to add a new group.

Parameters

  • namestring Required

    The name of the group.

  • clientstring

    The client id.

  • colorstring

    The color of the group.

  • currencystring

    The currency code (ISO, e.g., EUR).

  • domainstring,null

    The domain of expertise id.

  • dueDatedateTime

    The due date of the group.

  • dueDateAutoboolean

    True if the due date is automatically set based on the due dates of the jobs.

  • externalReferencestring

    The external reference.

  • purchaseOrderstring,null

    The purchase order.

Request

POST
/v2/groups
curl https://api.lsp.expert/v2/groups \
  -u {key}: \
  -d name="Demo group" \
  -d color="#991b1b" \
  -d dueDate="2024-10-14T13:00:00.000Z" \
  -d client="66f1313f9e477f90664d1ad8" \
  -d currency="EUR"

Response

{
  "id": "670d0e6d077d755ddaa9b132",
  "name": "Demo group",
  "archived": false,
  "budget": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    }
  },
  "client": {
    "id": "66f1313f9e477f90664d1ad8",
    "name": "Google"
  },
  "color": "#991b1b",
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "dueDate": "2024-10-14T13:00:00.000Z",
  "dueDateAuto": true,
  "estimation": {
    "isV2": true,
    "outsourcing": {
      "suppliers": [],
      "totals": []
    },
    "profitability": {
      "status": "noCurrency",
      "withMargin": {
        "status": "noCurrency"
      }
    },
    "total": 0,
    "totalInvoiced": 0,
    "totalTime": 0
  },
  "externalReference": "test",
  "files": [],
  "groupOnInvoice": false,
  "jobs": [],
  "labels": [],
  "notes": [],
  "object": "group",
  "pinned": false,
  "progress": 0,
  "services": [],
  "status": 1,
  "suppliers": [],
  "users": [],
  "createdAt": "2024-10-14T12:28:29.083Z",
  "updatedAt": "2024-10-14T12:28:29.087Z"
}


GET/v2/groups/:id

Retrieve a group

This endpoint allows you to retrieve a group by providing their id.

Request

GET
/v2/groups/:id
curl https://api.lsp.expert/v2/groups/670d0e6d077d755ddaa9b132 \
  -u {key}:

Response

{
  "id": "670d0e6d077d755ddaa9b132",
  "name": "Demo group",
  "archived": false,
  "budget": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    }
  },
  "client": {
    "id": "66f1313f9e477f90664d1ad8",
    "name": "Google"
  },
  "color": "#991b1b",
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "dueDate": "2024-10-14T13:00:00.000Z",
  "dueDateAuto": true,
  "estimation": {
    "isV2": true,
    "outsourcing": {
      "suppliers": [],
      "totals": []
    },
    "profitability": {
      "status": "noCurrency",
      "withMargin": {
        "status": "noCurrency"
      }
    },
    "total": 0,
    "totalInvoiced": 0,
    "totalTime": 0
  },
  "externalReference": "test",
  "files": [],
  "groupOnInvoice": false,
  "jobs": [],
  "labels": [],
  "notes": [],
  "object": "group",
  "pinned": false,
  "progress": 0,
  "services": [],
  "status": 1,
  "suppliers": [],
  "users": [],
  "createdAt": "2024-10-14T12:28:29.083Z",
  "updatedAt": "2024-10-14T12:28:29.087Z"
}


PUT/v2/groups/:id

Update a group

This endpoint allows you to perform an update on a group. Any parameters not provided will be left unchanged.

Parameters

  • namestring

    The name of the group.

  • archivedboolean

    True if the entity is archived.

  • budgetnumber,

    The budget of the group.

  • colorstring

    The color of the group.

  • domainstring,null

    The domain of expertise id.

  • dueDatedateTime

    The due date of the group.

  • dueDateAutoboolean

    True if the due date is automatically set based on the due dates of the jobs.

  • externalReferencestring

    The external reference.

  • groupOnInvoiceboolean

    True if all the jobs of the group are grouped on one line on the invoice.

  • pinnedboolean

    True if the entity is pinned.

  • purchaseOrderstring,null

    The purchase order.

Request

PUT
/v2/groups/:id
curl -X PUT https://api.lsp.expert/v2/groups/670d0e6d077d755ddaa9b132 \
  -u {key}: \
  -d groupOnInvoice=true

Response

{
  "id": "670d0e6d077d755ddaa9b132",
  "name": "Demo group",
  "archived": false,
  "budget": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    }
  },
  "client": {
    "id": "66f1313f9e477f90664d1ad8",
    "name": "Google"
  },
  "color": "#991b1b",
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "dueDate": "2024-10-14T13:00:00.000Z",
  "dueDateAuto": true,
  "estimation": {
    "isV2": true,
    "outsourcing": {
      "suppliers": [],
      "totals": []
    },
    "profitability": {
      "status": "noCurrency",
      "withMargin": {
        "status": "noCurrency"
      }
    },
    "total": 0,
    "totalInvoiced": 0,
    "totalTime": 0
  },
  "externalReference": "test",
  "files": [],
  "groupOnInvoice": true,
  "jobs": [],
  "labels": [],
  "notes": [],
  "object": "group",
  "pinned": false,
  "progress": 0,
  "services": [],
  "status": 1,
  "suppliers": [],
  "users": [],
  "createdAt": "2024-10-14T12:28:29.083Z",
  "updatedAt": "2024-10-14T12:28:29.087Z"
}

DELETE/v2/groups/:id

Delete a group

This endpoint allows you to delete a group.

Request

DELETE
/v2/groups/:id
curl -X DELETE https://api.lsp.expert/v2/groups/670d0e6d077d755ddaa9b132 \
  -u {key}:

POST/v2/groups/:id/jobs/:jobId

Add a job

This endpoint allows you to add a job in a group.

Parameters

Request

POST
/v2/groups/:id/jobs/:jobId
curl https://api.lsp.expert/v2/groups/670d0e6d077d755ddaa9b132/jobs/6703a087b041fd94bf3a31cb \
  -u {key}: 

Response

{
  "id": "670d0e6d077d755ddaa9b132",
  "name": "Demo group",
  "archived": false,
  "budget": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    }
  },
  "client": {
    "id": "66f1313f9e477f90664d1ad8",
    "name": "Google"
  },
  "color": "#991b1b",
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "dueDate": "2024-10-07T09:00:00.000Z",
  "dueDateAuto": true,
  "estimation": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "isV2": true,
    "outsourcing": {
      "suppliers": [],
      "totals": []
    },
    "profitability": {
      "status": "incorrectStatus",
      "withMargin": {
        "status": "incorrectStatus"
      }
    },
    "total": 400,
    "totalInvoiced": 0,
    "totalTime": 0
  },
  "externalReference": "test",
  "files": [],
  "groupOnInvoice": false,
  "jobs": [
    "670d0e8a077d755ddaa9b139",
    "6703a087b041fd94bf3a31cb"
  ],
  "labels": [],
  "notes": [],
  "object": "group",
  "pinned": false,
  "progress": 0,
  "services": [
    {
      "id": "6548c16d5136b418fd626e5f",
      "name": "Translation"
    }
  ],
  "status": 1,
  "suppliers": [],
  "users": [
    {
      "id": "6548c11c5136b418fd626e2f",
      "name": "Cédric Doe"
    }
  ],
  "createdAt": "2024-10-14T12:28:29.083Z",
  "updatedAt": "2024-10-14T12:47:44.694Z"
}


DELETE/v2/groups/:id/jobs/:jobId

Remove a job

This endpoint allows you to add a job in a group.

Parameters

Request

DELETE
/v2/groups/:id/jobs/:jobId
curl -X DELETE https://api.lsp.expert/v2/groups/670d0e6d077d755ddaa9b132/jobs/6703a087b041fd94bf3a31cb \
  -u {key}: 

Response

{
  "id": "670d0e6d077d755ddaa9b132",
  "name": "Demo group",
  "archived": false,
  "budget": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    }
  },
  "client": {
    "id": "66f1313f9e477f90664d1ad8",
    "name": "Google"
  },
  "color": "#991b1b",
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "dueDate": "2024-10-07T09:00:00.000Z",
  "dueDateAuto": true,
  "estimation": {
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "isV2": true,
    "outsourcing": {
      "suppliers": [],
      "totals": []
    },
    "profitability": {
      "status": "incorrectStatus",
      "withMargin": {
        "status": "incorrectStatus"
      }
    },
    "total": 400,
    "totalInvoiced": 0,
    "totalTime": 0
  },
  "externalReference": "test",
  "files": [],
  "groupOnInvoice": false,
  "jobs": [
    "670d0e8a077d755ddaa9b139"
  ],
  "labels": [],
  "notes": [],
  "object": "group",
  "pinned": false,
  "progress": 0,
  "services": [
    {
      "id": "6548c16d5136b418fd626e5f",
      "name": "Translation"
    }
  ],
  "status": 1,
  "suppliers": [],
  "users": [
    {
      "id": "6548c11c5136b418fd626e2f",
      "name": "Cédric Doe"
    }
  ],
  "createdAt": "2024-10-14T12:28:29.083Z",
  "updatedAt": "2024-10-14T12:47:44.694Z"
}