Project Types - GetBric/API GitHub Wiki

Project Types Index

  • Route: /project_types
  • Method: GET
  • Expected Response:
{
  "project_types": [
    {
      "id": 50,
      "link": "https://api.getbric.com/v1/project_types/50",
      "name": "Advertising",
      "billable": true,
      "projects": [
        {
          "id": 1052037201,
          "link": "https://api.getbric.com/v1/projects/1052037201",
          "name": "Summer Ad Campaign",
          "code": "D-431",
          "description": "3 TV spots, 2 Radio spots",
          "client": {
            "id": 1070822794,
            "link": "https://api.getbric.com/v1/clients/1070822794",
            "name": "MLB.com"
          }
        },
        {
          "id": 1052037202,
          "link": "https://api.getbric.com/v1/projects/1052037202",
          "name": "Fall Ad Campaign",
          "code": "D-432",
          "description": "2 TV spots, 1 Radio spot",
          "client": {
            "id": 1070822794,
            "link": "https://api.getbric.com/v1/clients/1070822794",
            "name": "MLB.com"
          }
        }
      ],
      "created_at": "2016-01-20T13:13:31.609-05:00",
      "updated_at": "2016-01-20T13:13:31.609-05:00"
    },
    {
      "id": 38,
      "link": "https://api.getbric.com/v1/project_types/38",
      "name": "In-house",
      "billable": false,
      "projects": [
        {
          "id": 1052037177,
          "link": "https://api.getbric.com/v1/projects/1052037177",
          "name": "Internal website redesign",
          "code": "IH-40",
          "description": "bring up our internal website to 21st century design principles",
          "client": {
            "id": 1070822781,
            "link": "https://api.getbric.com/v1/clients/1070822781",
            "name": "snails inc."
          }
        }
      ],
      "created_at": "2016-01-20T14:45:15.991-05:00",
      "updated_at": "2016-01-20T14:45:15.991-05:00"
    }
  ]
}

Project Type Create

  • Route: /project_types
  • Method: POST
  • Required Fields:
    • name
  • Allowed Fields:
    • billable (Allowed Parameters: true or false. It will default to true.)
  • Expected Response:
{
  "project_types": {
    "id": 57,
    "link": "https://api.getbric.com/v1/project_types/57",
    "name": "Marketing Blitz",
    "billable": true,
    "projects": [],
    "created_at": "2016-04-15T16:02:11.031-04:00",
    "updated_at": "2016-04-15T16:02:11.031-04:00"
  }
}

Project Type Show

  • Route: /project_types/id
  • Method: GET
  • Expected Response:
{
  "project_types": {
    "id": 36,
    "link": "https://api.getbric.com/v1/project_types/36",
    "name": "Advertising",
    "billable": true,
    "projects": [
      {
        "id": 1052037201,
        "link": "https://api.getbric.com/v1/projects/1052037201",
        "name": "Summer Ad Campaign",
        "code": "D-431",
        "description": "3 TV spots, 2 Radio spot",
        "client": {
          "id": 1070822794,
          "link": "https://api.getbric.com/v1/clients/1070822794",
          "name": "MLB.com"
        }
      },
      {
        "id": 1052037202,
        "link": "https://api.getbric.com/v1/projects/1052037202",
        "name": "Fall Ad Campaign",
        "code": "D-432",
        "description": "2 TV spots, 1 Radio spot",
        "client": {
          "id": 1070822794,
          "link": "https://api.getbric.com/v1/clients/1070822794",
          "name": "MLB.com"
        }
      }
    ],
    "created_at": "2016-01-20T13:13:31.609-05:00",
    "updated_at": "2016-01-20T13:13:31.609-05:00"
  }
}

Project Type Update

  • Route: /project_types/id
  • Method: PATCH
  • Allowed Fields:
    • name
    • billable
  • Expected Response:
{
  "project_types": {
    "id": 36,
    "link": "https://api.getbric.com/v1/project_types/36",
    "name": "Advertising",
    "billable": true,
    "projects": [
      {
        "id": 1052037201,
        "link": "https://api.getbric.com/v1/projects/1052037201",
        "name": "Summer Ad Campaign",
        "code": "D-431",
        "description": "3 TV spots, 2 Radio spot",
        "client": {
          "id": 1070822794,
          "link": "https://api.getbric.com/v1/clients/1070822794",
          "name": "MLB.com"
        }
      },
      {
        "id": 1052037202,
        "link": "https://api.getbric.com/v1/projects/1052037202",
        "name": "Fall Ad Campaign",
        "code": "D-432",
        "description": "2 TV spots, 1 Radio spot",
        "client": {
          "id": 1070822794,
          "link": "https://api.getbric.com/v1/clients/1070822794",
          "name": "MLB.com"
        }
      }
    ],
    "created_at": "2016-01-20T13:13:31.609-05:00",
    "updated_at": "2016-01-20T13:13:31.609-05:00"
  }
}

Project Type Destroy

  • Route: /project_types/id
  • Method: DELETE
  • Expected Response:
{
  "project_types": {
    "id": 36,
    "link": "https://api.getbric.com/v1/project_types/36",
    "name": "Advertising",
    "billable": true,
    "projects": [
      {
        "id": 1052037201,
        "link": "https://api.getbric.com/v1/projects/1052037201",
        "name": "Summer Ad Campaign",
        "code": "D-431",
        "description": "3 TV spots, 2 Radio spot",
        "client": {
          "id": 1070822794,
          "link": "https://api.getbric.com/v1/clients/1070822794",
          "name": "MLB.com"
        }
      },
      {
        "id": 1052037202,
        "link": "https://api.getbric.com/v1/projects/1052037202",
        "name": "Fall Ad Campaign",
        "code": "D-432",
        "description": "2 TV spots, 1 Radio spot",
        "client": {
          "id": 1070822794,
          "link": "https://api.getbric.com/v1/clients/1070822794",
          "name": "MLB.com"
        }
      }
    ],
    "created_at": "2016-01-20T13:13:31.609-05:00",
    "updated_at": "2016-01-20T13:13:31.609-05:00"
  }
}