Projects

GET api/v2/Organisation/{Slug}/Projects

Description: Returns a paged list of projects Example: https://api.totalsynergy.com/api/v2/Organisation/testOrg/Projects
Optional Parameters:
StatusTypeId long value - filter projects to those of a certain status type
ManagerId long value - filter projects to those of the manager
IsDefault bool value - returns default projects
IncludeCustomFields bool value - include the custom fields for each project
UpdatedDate UTC date value - only include projects updated on or after this date
CreatedDate UTC date value - only include projects created on or after this date
Response:

{
  "totalItems": 1,
  "items": [
    {
      "id": 1,
      "organisationId": 3,
      "organisationName": "heya",
      "isOfficeProject": true,
      "isDefault": true,
      "number": "",
      "name": "
    ",
    "scope": "Cash cheques and break necks.",
    "statusName": "Active",
    "startDate": "2016-11-17T00:00:00",
    "endDate": "2016-12-21T00:00:00",
    "invoices": 0,
    "isActive": true,
    "primaryContactId": 1,
    "primaryContactName": "ABC Construction",
    "createdDate": "2016-11-14T23:43:37.68",
    "updatedDate": "2016-11-17T22:59:21.37",
    "address": {
    "id": 4,
    "address1": "123 Fake Street",
    "address2": "WhyAreYouReadingThisVille",
    "town": "Newport",
    "state": "NSW",
    "zipCode": "2108",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "123 Fake Street, WhyAreYouReadingThisVille, Newport, NSW, 2108, Australia"
    },
    "customFields": [
    {"name": "Project sector", "displayValue": "Educational" }
    ]
    }
    ],
    "currentPage": 1,
    "pageSize": 10,
    "totalPages": 1,
    "hasNext": false
    }

Try it out

Loading...
200
        {Response body}
			
Method
GET
Request Headers
'Content-Type': 'application/json' token
URL
http://some url here.com

GET api/v2/Organisation/{Slug}/Projects/{Id}

Description: Returns a project that matches the given id Example: https://api.totalsynergy.com/api/v2/Organisation/testOrg/Projects/1 Response:

{
  "address": {
    "id": 4,
    "address1": "123 Fake Street",
    "address2": "WhyAreYouReadingThisVille",
    "town": "Newport",
    "state": "NSW",
    "zipCode": "2108",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "123 Fake Street, WhyAreYouReadingThisVille, Newport, NSW, 2108, Australia"
  },
  "id": 1,
  "name": "",
  "externalName": "",
  "clientReferenceNumber": null,
  "scope": "Cash cheques and break necks.",
  "isBillable": false,
  "canChangeBillable": true,
  "start": "2016-11-17T00:00:00",
  "end": "2016-12-21T00:00:00",
  "fee": 0,
  "tags": null,
  "availableTags": null,
  "statusId": 5,
  "status": "Active",
  "projectTypeId": 2,
  "projectType": "Commercial",
  "projectTypeCode": "COMM",
  "hasWorkBreakdown": false,
  "hasCustomProjectNumber": false,
  "projectNumber": "",
  "numberingId": 0,
  "numberFormatted": "",
    "prefix": null,
    "number": 0,
    "suffix": null,
    "managerId": 1,
    "manager": "Dev Ster"
    "primaryContactId": 1,
    "primaryContactName": "ABC Construction",
    "createdDate": "2016-11-14T23:43:37.68",
    "updatedDate": "2016-11-17T22:59:21.37",
    }

GET api/v2/Organisation/{Slug}/Projects/OfficeProjectsForSelection

Description: Returns a paged list of office projects that are available for timesheet selection Example: https://api.totalsynergy.com/api/v2/Organisation/{Slug}/Projects/OfficeProjectsForSelection Response:

[
  {
    "id": 1,
    "name": "",
    "number": "",
    "display": "  ",
    "organisationId": 0,
    "organisation": null,
    "group": "Office",
    "groupId": 0
  }
]
                        

POST api/v2/Organisation/{Slug}/Projects

Description: Creates a project Example: https://api.totalsynergy.com/api/v2/Organisation/{Slug}/Projects
Required Parameters:
Name string value of the projects name
ManagerId long value matching a contacts id
Optional Parameters:
External Name string value - name the external contacts will view the project as
Scope string value - description of the project's field of work
IsBillable bool value - set this to true (1)
Address AddressJson value containing detailed project address information
Start Nullable Date value - start date of the project
End Nullable Date value - end date of the project
Fee Long value - Fee charged for the project
Tags String value - tags to be attached to the project (comma separated)
StatusId long value - id representing a given status, use the ProjectStatus endpoint to get the id
Status String value - the name of the status to use (E.g. Proposed, Active), ignored if StatusId supplied
primaryContactId long value - id representing a contact to be used as the primary contact
invoiceContactId long value - id representing a contact to be used as the invoice contact
Example Request:

    {
        "name": "Cool Project",
        "scope" : "Demonstrate the POST request on Projects",
        "Fee" : 9999,
        "address": {
            "address1": "123 Fake Street",
            "address2": "WhyAreYouReadingThisVille",
            "town": "Newport",
            "state": "NSW",
            "zipCode": "2108",
            "country": "Australia"
        },
        "tags" : "Tester",
        "managerId" : 1,
        "isBillable": 1
    }
Response:

{
  "address": {
    "id": 0,
    "address1": "123 Fake Street",
    "address2": "WhyAreYouReadingThisVille",
    "town": "Newport",
    "state": "NSW",
    "zipCode": "2108",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": null
  },
  "id": 2,
  "name": "Cool Project",
  "externalName": null,
  "clientReferenceNumber": null,
  "scope": "Demonstrate the POST request on Projects",
  "isBillable": false,
  "start": null,
  "end": null,
  "fee": 9999,
  "defaultExternalNameFromName": false,
  "tags": "Tester",
  "availableTags": null,
  "statusId": 0,
  "status": null,
  "projectTypeId": 0,
  "projectType": null,
  "projectTypeCode": null,
  "hasWorkBreakdownTemplate": false,
  "workBreakdownTemplateId": 0,
  "workBreakdownTemplate": null,
  "hasCustomProjectNumber": false,
  "numberingId": 0,
  "numberFormatted": null,
  "prefix": null,
  "number": 0,
  "suffix": null,
  "managerId": 1,
  "manager": null,
  "primaryContactId": 0,
  "projectContact": null,
  "invoiceContactId": 0,
  "invoiceContact": null,
  "cardOfContactId": 0,
  "cardOfContact": null
}                    

PUT api/v2/Organisation/{Slug}/Projects/Update

Description: Updates a project Example: https://api.totalsynergy.com/api/v2/Organisation/{Slug}/Projects/Update
Required Parameters:
Id Project Id
Name string value of the projects name
ProjectTypeId long value matching a project type id
ManagerId long value matching a contacts id
Optional Parameters:
External Name string value - name the external contacts will view the project as
Scope string value - description of the project's field of work
IsBillable bool value - set this to true (1)
Address AddressJson value containing detailed project address information
Start Nullable Date value - start date of the project
End Nullable Date value - end date of the project
Fee Long value - Fee charged for the project
Tags String value - tags to be attached to the project (comma separated)
primaryContactId long value - id representing a contact to be used as the primary contact
invoiceContactId long value - id representing a contact to be used as the invoice contact
Example Request:

    {
    "address": {
                "id": 573,
                "address1": "123 Fake Street",
                "address2": "WhyAreYouReadingThisVille",
                "town": "Newport",
                "state": "NSW",
                "zipCode": "2108",
                "country": "Australia",
                "latitude": 0,
                "longitude": 0,
                "hasAddress": false,
                "singleline": null
                },
    "id": 4,
    "name": "Cool Project",
    "externalName": null,
    "clientReferenceNumber": null,
    "scope": "Demonstrate the POST request on Projects",
    "isBillable": false,
    "start": null,
    "end": null,
    "fee": 9999,
    "defaultExternalNameFromName": false,
    "tags": "Tester",
    "availableTags": null,    
    "projectTypeId": 52,
    "projectType": null,
    "projectTypeCode": null,
    "hasWorkBreakdownTemplate": false,
    "workBreakdownTemplateId": 0,
    "workBreakdownTemplate": null,
    "hasCustomProjectNumber": false,
    "numberingId": 0,
    "numberFormatted": null,
    "prefix": null,
    "number": 0,
    "suffix": null,
    "managerId": 1,
    "manager": null,
    "primaryContactId": 0,
    "projectContact": null,
    "invoiceContactId": 0,
    "invoiceContact": null,
    "cardOfContactId": 0,
    "cardOfContact": null
    }
Response:

    {
    "address": {
                "id": 573,
                "address1": "123 Fake Street",
                "address2": "WhyAreYouReadingThisVille",
                "town": "Newport",
                "state": "NSW",
                "zipCode": "2108",
                "country": "Australia",
                "latitude": 0,
                "longitude": 0,
                "hasAddress": false,
                "singleline": null
               },
    "id": 4,
    "name": "Cool Project",
    "externalName": null,
    "clientReferenceNumber": null,
    "scope": "Demonstrate the POST request on Projects",
    "isBillable": false,
    "start": null,
    "end": null,
    "fee": 9999,
    "defaultExternalNameFromName": false,
    "tags": "Tester",
    "availableTags": null,
    "statusId": 0,
    "status": null,
    "projectTypeId": 52,
    "projectType": null,
    "projectTypeCode": null,
    "hasWorkBreakdownTemplate": false,
    "workBreakdownTemplateId": 0,
    "workBreakdownTemplate": null,
    "hasCustomProjectNumber": false,
    "numberingId": 0,
    "numberFormatted": null,
    "prefix": null,
    "number": 0,
    "suffix": null,
    "managerId": 1,
    "manager": null,
    "primaryContactId": 0,
    "projectContact": null,
    "invoiceContactId": 0,
    "invoiceContact": null,
    "cardOfContactId": 0,
    "cardOfContact": null
    }