Chilkat Online Tools

Unicode C++ / New FreshBooks / Single Project

Back to Collection Items

void ChilkatSample(void)
    {
    http.put_AuthToken(L"<access_token>");    success = http.QuickGetSb(L"https://api.freshbooks.com/projects/business/{{businessId}}/projects/{{projectId}}",sbResponseBody);    jResp.LoadSb(sbResponseBody);    jResp.put_EmitCompact(false);    jResp.put_I(i);    business_id = jResp.IntOf(L"project.services[i].business_id");    id = jResp.IntOf(L"project.services[i].id");    name = jResp.stringOf(L"project.services[i].name");    billable = jResp.BoolOf(L"project.services[i].billable");    vis_state = jResp.IntOf(L"project.services[i].vis_state");    i = i + 1;    i = 0;    count_i = jResp.SizeOfArray(L"project.group.members");    jResp.put_I(i);    id = jResp.IntOf(L"project.group.members[i].id");    identity_id = jResp.IntOf(L"project.group.members[i].identity_id");    role = jResp.stringOf(L"project.group.members[i].role");    first_name = jResp.stringOf(L"project.group.members[i].first_name");    last_name = jResp.stringOf(L"project.group.members[i].last_name");    email = jResp.stringOf(L"project.group.members[i].email");    company = jResp.stringOf(L"project.group.members[i].company");    active = jResp.BoolOf(L"project.group.members[i].active");    i = i + 1;    i = 0;    count_i = jResp.SizeOfArray(L"project.group.pending_invitations");    jResp.put_I(i);    i = i + 1;    i = 0;    count_i = jResp.SizeOfArray(L"abilities");    jResp.put_I(i);    name = jResp.stringOf(L"abilities[i].name");    value = jResp.BoolOf(L"abilities[i].value");    i = i + 1;
    }

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://api.freshbooks.com/projects/business/{{businessId}}/projects/{{projectId}}

Postman Collection Item JSON

{
  "name": "Single Project",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://api.freshbooks.com/projects/business/{{businessId}}/projects/{{projectId}}",
      "protocol": "https",
      "host": [
        "api",
        "freshbooks",
        "com"
      ],
      "path": [
        "projects",
        "business",
        "{{businessId}}",
        "projects",
        "{{projectId}}"
      ]
    }
  },
  "response": [
    {
      "name": "Single Project",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "https://api.freshbooks.com/projects/business/{{businessId}}/projects/{{projectId}}",
          "protocol": "https",
          "host": [
            "api",
            "freshbooks",
            "com"
          ],
          "path": [
            "projects",
            "business",
            "{{businessId}}",
            "projects",
            "{{projectId}}"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "nginx"
        },
        {
          "key": "Content-Type",
          "value": "application/vnd.api+json"
        },
        {
          "key": "X-Version",
          "value": "1905.7.0"
        },
        {
          "key": "X-NewRelic-App-Data",
          "value": "PxQBWV5TCBABVllUBAQOU10TGhE1AwE2QgNWEVlbQFtcCxYnRA9QFg1ZWU4FDFZFVRYSBxlDUhULRERQBxVNEkINUgdbTBpAVhZWFEMCVlgURFgLAwBMERxUTVIZAAFUXAIBBFZVVFcJUw1XCg8YHwJJG1hUUABaBwcHVFMFDVEEUFVAG1dWChdUaw=="
        },
        {
          "key": "X-RateLimit-Limit",
          "value": "20"
        },
        {
          "key": "X-RateLimit-Remaining",
          "value": "14"
        },
        {
          "key": "X-RateLimit-Reset",
          "value": "1557345999"
        },
        {
          "key": "Retry-After",
          "value": "60"
        },
        {
          "key": "Access-Control-Allow-Origin",
          "value": "*"
        },
        {
          "key": "Expires",
          "value": "Tue, 08 May 2018 20:05:38 GMT"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Via",
          "value": "1.1 google"
        },
        {
          "key": "Via",
          "value": "1.1 varnish"
        },
        {
          "key": "Accept-Ranges",
          "value": "bytes"
        },
        {
          "key": "Accept-Ranges",
          "value": "bytes"
        },
        {
          "key": "Age",
          "value": "0"
        },
        {
          "key": "Age",
          "value": "0"
        },
        {
          "key": "Content-Length",
          "value": "1653"
        },
        {
          "key": "Date",
          "value": "Wed, 08 May 2019 20:05:38 GMT"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "X-Served-By",
          "value": "cache-mdw17361-MDW"
        },
        {
          "key": "X-Cache",
          "value": "MISS"
        },
        {
          "key": "X-Cache-Hits",
          "value": "0"
        },
        {
          "key": "Country",
          "value": "CA"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=31536000; includeSubDomains; preload"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"project\": {\n        \"id\": 2976412,\n        \"title\": \"Very Custom Computer thing\",\n        \"description\": null,\n        \"due_date\": null,\n        \"client_id\": 31006,\n        \"internal\": false,\n        \"budget\": null,\n        \"fixed_price\": null,\n        \"rate\": null,\n        \"billing_method\": \"project_rate\",\n        \"project_type\": \"fixed_price\",\n        \"active\": true,\n        \"complete\": false,\n        \"sample\": false,\n        \"created_at\": \"2019-04-18T13:43:31\",\n        \"updated_at\": \"2019-04-18T13:43:31\",\n        \"logged_duration\": null,\n        \"services\": [\n            {\n                \"business_id\": 1966214,\n                \"id\": 3575792,\n                \"name\": \"Computer Hardware\",\n                \"billable\": true,\n                \"vis_state\": 0\n            }\n        ],\n        \"billed_amount\": \"0.00\",\n        \"billed_status\": \"unbilled\",\n        \"retainer_id\": null,\n        \"group\": {\n            \"id\": 4942784,\n            \"members\": [\n                {\n                    \"id\": 6446258,\n                    \"identity_id\": 1882548,\n                    \"role\": \"owner\",\n                    \"first_name\": \"Ryan\",\n                    \"last_name\": \"Marr\",\n                    \"email\": \"api.freshbooks@freshbooks.com\",\n                    \"company\": \"Postman Sandbox\",\n                    \"active\": true\n                }\n            ],\n            \"pending_invitations\": []\n        }\n    },\n    \"abilities\": [\n        {\n            \"name\": \"can_edit\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_archive\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_generate_invoice\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_delete\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_invite_team_member\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_manage_services\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_edit_hourly_budget\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_view_fixed_price\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_edit_fixed_price\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_edit_end_date\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_edit_flat_rate\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_edit_project_type\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_edit_title\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_view_review_tab\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_view_discuss_tab\",\n            \"value\": false\n        },\n        {\n            \"name\": \"can_track_time\",\n            \"value\": true\n        },\n        {\n            \"name\": \"can_create_comment\",\n            \"value\": true\n        }\n    ]\n}"
    }
  ]
}