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": "426664231528564422",
    "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": "426664231634470602",
    "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/426664231717308108.json?
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664231717308108",
  "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": "426664231928071890",
  "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/426664232046560982.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664232046560982",
  "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/426664232139884249.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/426664232244741852.json
    

Response