# Projects

The projects endpoint url is:

https://skhokho.io/api/v1.0/projects

# Project GET Request

Projects GET request will fetch a list of projects associated with the company of the user who is currently authenticated. The structure of the list will be:

[
  {
    "id": 35,
    "title": "Toilet Paper Project",
    "description": "<h1>Project Description</h1><p>orem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. Ut et ligula dolor, sit amet consequat lorem. Aliquam porta eros sed velit imperdiet egestas. Maecenas tempus eros ut diam ullamcorper id dictum libero tempor. Donec quis augue quis magna condimentum lobortis. Quisque imperdiet ipsum vel magna viverra rutrum.</p>",
    "scopeOfWork": "<h1>Scope of Work</h1><p>orem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. Ut et ligula dolor, sit amet consequat lorem. Aliquam porta eros sed velit imperdiet egestas. Maecenas tempus eros ut diam ullamcorper id dictum libero tempor. Donec quis augue quis magna condimentum lobortis. Quisque imperdiet ipsum vel magna viverra rutrum.</p>",
    "deliverables": "<h1>Project Deliverables</h1><p>orem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. Ut et ligula dolor, sit amet consequat lorem. Aliquam porta eros sed velit imperdiet egestas. Maecenas tempus eros ut diam ullamcorper id dictum libero tempor. Donec quis augue quis magna condimentum lobortis. Quisque imperdiet ipsum vel magna viverra rutrum.</p>",
    "start": "2022-09-05",
    "end": "2022-09-10",
    "client": {
        "id": 28,
        "companyName": "Toilet Paper roll",
        "companyEmail": "roll@gmail.com",
        "companyPhone": "033382099",
        "companyTaxNumber": "3453654645",
        "companyWebsite": "https://skhokho.io",
        "companySize": "Small Business",
        "companyIndustry": "Consumer Products & Services",
        "addressLine1": "12 Church Streeet",
        "city": "Sandton",
        "state": "Gauteng",
        "country": "South Africa",
        "postalCode": "2196",
        "twitter": "https://twitter.com",
        "facebook": "https://facebook.com",
        "linkedIn": "https://linkedin.com",
        "uniqueId": "xxxxxxxxx"
    },
    "uniqueId": "xxxxxxxxx"
},
    . . . . . // Other Results
]

When you request project records, you also get the client record associated with that project.

# Projects POST Request

When you want to create a new project record, you can send a POST request to the projects end-point.

When creating a project, you will also need to specify the client associated with that project. There are two options for adding a client to the project:

  1. Specify a name of an existing client
  2. Supply enough information to create a new client record

# Project Payload Example with existing Client Record:

{
  "title": "New Project Title",
  "description": "Project description goes here",
  "scopeOfWork": "Scope of work goes here",
  "deliverables": "Project deliverables go here",
  "start": "2022-09-05",
  "end": "2022-09-10",
  "client": {
      "companyName": "Existing Client Name",
    }
}
Field Required/Optional Json Key Data Type Format
Title of Project Required title string
Description of Project Optional description HTML Field Standard HTML or Long Text
Scope of Work Optional scopeOfWork HTML Field Standard HTML or Long Text
Project Deliverables Optional deliverables HTML Field Standard HTML or Long Text
Project Start Date Required start string YYYY-MM-DD
Project End Date Required end string YYYY-MM-DD
Client Required client json object See Client API

# Invoice Payload Example with New Client Record:

{
  "title": "New Project Title",
  "description": "Project description goes here",
  "scopeOfWork": "Scope of work goes here",
  "deliverables": "Project deliverables go here",
  "start": "2022-09-05",
  "end": "2022-09-10",
  "client": {
    "companyName": "Construction Lorem",
    "companyEmail": "aryastark70@gmail.com",
    "companyPhone": "+27 67 221 8834",
    "companyTaxNumber": "128373747",
    "companyWebsite": "https://skhokho.io",
    "companySize": "Medium Sized",
    "companyIndustry": "Construction",
    "addressLine1": "1 Church Streeet",
    "city": "Johannesburg",
    "state": "Gauteng",
    "country": "South Africa",
    "postalCode": "2122",
    "twitter": "https://twitter.com",
    "facebook": "https://facebook.com",
    "linkedIn": "https://linkedin.com"
    }
}

TIP

See Client API to get the full data structure of the Client Object.