Projects

List all projects of an administration

Returns a paginated list of projects in the administration. Each page contains 25 projects. You can use the page parameter to fetch the next page of projects. It returns the active projects when no filter is applied.

Parameters

Parameter Type Description
filter String

The filter, can be: state:all, state:archived or state:active

page Integer

The page to fetch, starting at 1.

per_page Integer

Amount of projects per page, default: 25

Example: returns the list of projects

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/projects.json?
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546318814643869",
    "name": "My project name",
    "state": "active"
  }
]
      

Example: returns the list of filtered archived projects

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/projects.json?filter=state%3Aarchived
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546318923695777",
    "name": "Project Blackbird",
    "state": "archived"
  }
]
      

Returns information about a project

Example: returns a single project

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/projects/433546319009679012.json?
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546319009679012",
  "name": "My project name",
  "state": "active"
}
      

Example: returns 404 when project does not exist

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/projects/1337.json?
    

Response

        
          
          Status: 404 Not Found
        
      
{
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Creates a new project

Parameters

Parameter Type Description
project[name] String

Required

Should be unique for the administration.

project[budget] String

Example: creates a new project

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"project":{"name":"Falcon"}}' \
  https://moneybird.com/api/v2/123/projects.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "433546319260288682",
  "name": "Falcon",
  "state": "active"
}
      

Example: returns an error when information is missing

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"project":{"name":""}}' \
  https://moneybird.com/api/v2/123/projects.json
    

Response

        
          
          Status: 422 Unprocessable Entity
        
      
{
  "error": {
    "name": [
      "mag niet leeg zijn"
    ]
  }
}
      

Updates a project

Parameters

Parameter Type Description
project[name] String

Required

Should be unique for the administration.

project[budget] String

Example: updates a project

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"project":{"name":"Eagle"}}' \
  https://moneybird.com/api/v2/123/projects/433546319389263534.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546319389263534",
  "name": "Eagle",
  "state": "active"
}
      

Deletes a project

Deletes a project. When there are no linked entities (sales invoices, estimates, etc.) the project is deleted. When there are linked entities, the project gets the state archived.

Example: deletes a project without a linked entity

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/projects/433546319488878257.json
    

Response

Example: archives a project with a linked entity

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/projects/433546319590590132.json
    

Response