GET

Description

Retrieves a list of projects or a single project.

URL structure

https://api.fortnox.se/3/projects/{ProjectNumber}

Method

GET

Version

3

Response

The project register can return a list of records or a single record. By specifying a ProjectNumber in the URL, a single record will be returned. If no ProjectNumber is provided, a list of records will be returned.

<?xml version="1.0" encoding="UTF-8"?>
<Projects TotalResources="3" TotalPages="1" CurrentPage="1">
  <ProjectSubset url="https://api.fortnox.se/3/projects/1">
    <Description>1</Description>
    <EndDate></EndDate>
    <ProjectNumber>1</ProjectNumber>
    <Status>ONGOING</Status>
    <StartDate>2013-12-18</StartDate>
  </ProjectSubset>

  [...]

  <ProjectSubset url="https://api.fortnox.se/3/projects/3">
    <Description>Bygg</Description>
    <EndDate>2014-03-28</EndDate>
    <ProjectNumber>3</ProjectNumber>
    <Status>NOTSTARTED</Status>
    <StartDate>2014-01-18</StartDate>
  </ProjectSubset>
</Projects>
<?xml version="1.0" encoding="UTF-8"?>
<Project url="https://api.fortnox.se/3/projects/1">
    <Comments></Comments>
    <ContactPerson></ContactPerson>
    <Description>1</Description>
    <EndDate></EndDate>
    <ProjectLeader></ProjectLeader>
    <ProjectNumber>1</ProjectNumber>
    <Status>ONGOING</Status>
    <StartDate>2013-12-18</StartDate>
</Project>
{
    "MetaInformation": {
        "@TotalResources": 3,
        "@TotalPages": 1,
        "@CurrentPage": 1
    },
    "Projects": [
        {
            "@url": "https://api.fortnox.se/3/projects/1",
            "Description": "1",
            "EndDate": null,
            "ProjectNumber": "1",
            "Status": "ONGOING",
            "StartDate": "2013-12-18"
        },
[...]

{
"@url": "https://api.fortnox.se/3/projects/3",
"Description": "Bygg",
"EndDate": "2014-03-28",
"ProjectNumber": 3,
"Status": "NOTSTARTED",
"StartDate": "2014-01-18"
}
]
}
{
  "Project": {
    "@url": "https://api.fortnox.se/3/projects/1",
    "Comments": null,
    "ContactPerson": null,
    "Description": "1",
    "EndDate": null,
    "ProjectLeader": null,
    "ProjectNumber": "1",
    "Status": "ONGOING",
    "StartDate": "2013-12-18"
  }
}

POST

Description

Creates a project

URL structure

https://api.fortnox.se/3/projects

Method

POST

Request

The request body should contain a structure of a project, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<Project>
  <Description>Project1</Description>
  <Status>ONGOING</Status>
</Project>
{
    "Project": {
        "Description": "Projekt",
        "Status": "ONGOING"
    }
}

Response

The response should contain the created project in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<Project url="https://api.fortnox.se/3/projects/13">
  <Comments></Comments>
  <ContactPerson></ContactPerson>
  <Description>Projekt</Description>
  <EndDate></EndDate>
  <ProjectLeader></ProjectLeader>
  <ProjectNumber>13</ProjectNumber>
  <Status>ONGOING</Status>
  <StartDate></StartDate>
</Project>
{
  "Project": {
    "@url": "https://api.fortnox.se/3/projects/13",
    "Comments": null,
    "ContactPerson": null,
    "Description": "Projekt",
    "EndDate": null,
    "ProjectLeader": null,
    "ProjectNumber": "12",
    "Status": "ONGOING",
    "StartDate": null
  }
}

PUT

Description

Updates a project

URL structure

https://api.fortnox.se/3/projects/{ProjectNumber}

Method

PUT

Version

3

Request

The request body should contain a structure of a project, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<Project>
  <Description>Projekt</Description>
  <Status>ONGOING</Status>
  <StartDate>2014-02-28</StartDate>
</Project>
{
  "Project": {
    "Description": "Projekt",
    "Status": "ONGOING",
    "StartDate": "2014-02-28"
  }
}

Response

The response should contain the created project in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<Project url="https://api.fortnox.se/3/projects/13">
  <Comments></Comments>
  <ContactPerson></ContactPerson>
  <Description>Projekt</Description>
  <EndDate></EndDate>
  <ProjectLeader></ProjectLeader>
  <ProjectNumber>13</ProjectNumber>
  <Status>ONGOING</Status>
  <StartDate>2014-02-28</StartDate>
</Project>
{
  "Project": {
    "@url": "https://api.fortnox.se/3/projects/13",
    "Comments": null,
    "ContactPerson": null,
    "Description": "Projekt",
    "EndDate": null,
    "ProjectLeader": null,
    "ProjectNumber": "13",
    "Status": "ONGOING",
    "StartDate": "2014-02-28"
  }
}

DELETE

Description

Removes a project

URL structure

https://api.fortnox.se/3/projects/{ProjectNumber}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response should be empty.

Fields

FIELD

DESCRIPTION

LIMITS

TYPE

SEARCHABLE

SORTABLE

REQUIRED

R/W

Url

Direct URL to the record

String

R

Comments

Comments on project

512 characters

 String  –  –  –

R/W

ContactPerson

ContactPerson for project.

50 characters

 String  –  –  –

R/W

Description

Description of the project

50 characters

String  –  –  Yes

R/W

EndDate

End date of the project.

 – Date  –  –  –

R/W

ProjectLeader

Projectleader

50 characters

String  –  –  –

R/W

ProjectNumber

Projectnumber.

20 characters

String  –  –  –

R/W

Status

Status of the project

 NOTSTARTED / ONGOING / COMPLETED String  –  –  –

R/W

StartDate

Start date of the project

 –  Date  –  –  –

R/W