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
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": "273127011990373567",
    "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": "273127012132979907",
    "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/273127012282926277.json?
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "273127012282926277",
  "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.

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": "273127012526195915",
  "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": [
      "cannot be empty"
    ]
  }
}
      

Updates a project

Parameters

Parameter Type Description
project[name] String

Required

Should be unique for the administration.

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/273127012726473935.json
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "273127012726473935",
  "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/273127012850205906.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/273127012995957973.json
    

Response