Use cases

Here are use cases that demonstrate how to use the Project API for a few transactions. To demonstrate these use cases, we have added support for a few transactions so that you can configure a project ID.

App integration

The following figure provides an overview of how to integrate the Project API with your app.

qbo/docs/workflows/manage-projects/project-integration-diagram.png
qbo/docs/workflows/manage-projects/project-integration-diagram.png

x

Use case 1: Add an invoice transaction to a project

Step 1: Create or read a project. Use projectManagementCreateProject (mutation) or projectManagementProject (query).

Step 2: Create an invoice using the Accounting REST API and set the ProjectRef attributes with values from the project. For information about creating an invoice, see Create basic invoices.

Create invoice request using ProjectRef

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
   {
      "TxnDate": "2024-06-26",
      "CurrencyRef": {
         "value": "USD",
         "name": "United States Dollar"
      },
      "LinkedTxn": [],
      "Line": [
         {
            "Id": "1",
            "LineNum": 1,
            "Description": "Test1",
            "Amount": 50.99,
            "DetailType": "SalesItemLineDetail",
            "SalesItemLineDetail": {
               "ItemRef": {
                  "value": "2",
                  "name": "Hours"
               },
               "UnitPrice": 50.99,
               "Qty": 1,
               "ItemAccountRef": {
                  "value": "5",
                  "name": "Sales"
               },
               "TaxCodeRef": {
                  "value": "NON"
               }
            }
         },
         {
            "Amount": 50.99,
            "DetailType": "SubTotalLineDetail",
            "SubTotalLineDetail": {}
         }
      ],
      "Tag": [],
      "ProjectRef": {
         "value": "393363026"
      },
      "CustomerRef": {
         "value": "1",
         "name": "Test Customer"
      },
      "BillAddr": {
         "Id": "4",
         "Lat": "INVALID",
         "Long": "INVALID"
      },
      "FreeFormAddress": false,
      "SalesTermRef": {
         "value": "3",
         "name": "Net 30"
      },
      "TotalAmt": 50.99,
      "Balance": 50.99
   }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
   {
      "Invoice": {
         "Id": "5",
         "SyncToken": "0",
         "MetaData": {
            "CreateTime": "2024-06-26T09:20:16-07:00",
            "LastModifiedByRef": {
               "value": "9341452110907680"
            },
            "LastUpdatedTime": "2024-06-26T09:20:16-07:00"
         },
         "TxnDate": "2024-06-26",
         "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
         },
         "LinkedTxn": [],
         "Line": [
            {
               "Id": "1",
               "LineNum": 1,
               "Description": "Test1",
               "Amount": 50.99,
               "DetailType": "SalesItemLineDetail",
               "SalesItemLineDetail": {
                  "ItemRef": {
                     "value": "2",
                     "name": "Hours"
                  },
                  "UnitPrice": 50.99,
                  "Qty": 1,
                  "ItemAccountRef": {
                     "value": "5",
                     "name": "Sales"
                  },
                  "TaxCodeRef": {
                     "value": "NON"
                  }
               }
            },
            {
               "Amount": 50.99,
               "DetailType": "SubTotalLineDetail",
               "SubTotalLineDetail": {}
            }
         ],
         "ProjectRef": {
            "value": "393363026"
         },
         "CustomerRef": {
            "value": "1",
            "name": "Test Customer"
         },
         "BillAddr": {
            "Id": "2"
         },
         "ShipAddr": {
            "Id": "2"
         },
         "FreeFormAddress": true,
         "ShipFromAddr": {
            "Id": "5",
            "Line1": "2600 Marine Way",
            "Line2": "Mountain view, CA  94043 US"
         },
         "SalesTermRef": {
            "value": "3",
            "name": "Net 30"
         },
         "DueDate": "2024-07-26",
         "TotalAmt": 50.99,
         "Balance": 50.99
      },
      "time": "2024-06-26T09:20:16.310-07:00"
   }
Use case 2: Add an estimate transaction to a project

Step 1: Create or read a project. Use projectManagementCreateProject (mutation) or projectManagementProject (query).

Step 2: Create an estimate using the Accounting REST API and set the ProjectRef attributes with values from the project. For information about referencing a project to an estimate, see Estimate.

Create estimate request using ProjectRef

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
   {
      "TotalAmt": 31.5,
      "BillEmail": {
         "Address": "Cool_Cars@intuit.com"
      },
      "CustomerMemo": {
         "value": "Thank you for your business and have a great day!"
      },
      "ShipAddr": {
         "City": "Half Moon Bay",
         "Line1": "65 Ocean Dr.",
         "PostalCode": "94213",
         "Lat": "37.4300318",
         "Long": "-122.4336537",
         "CountrySubDivisionCode": "CA",
         "Id": "4"
      },
      "PrintStatus": "NeedToPrint",
      "EmailStatus": "NotSet",
      "BillAddr": {
         "City": "Half Moon Bay",
         "Line1": "65 Ocean Dr.",
         "PostalCode": "94213",
         "Lat": "37.4300318",
         "Long": "-122.4336537",
         "CountrySubDivisionCode": "CA",
         "Id": "4"
      },
      "Line": [
         {
            "Description": "Pest Control Services",
            "DetailType": "SalesItemLineDetail",
            "SalesItemLineDetail": {
               "TaxCodeRef": {
                  "value": "NON"
                  },
                  "Qty": 1,
                  "UnitPrice": 35,
                  "ItemRef": {
                  "name": "Pest Control",
                  "value": "1"
               }
            },
            "LineNum": 1,
            "Amount": 35.0,
            "Id": "1"
         },
         {
            "DetailType": "SubTotalLineDetail",
            "Amount": 35.0,
            "SubTotalLineDetail": {}
         },
         {
            "DetailType": "DiscountLineDetail",
            "Amount": 3.5,
            "DiscountLineDetail": {
               "DiscountAccountRef": {
                  "name": "Discounts given",
                  "value": "86"
               },
               "PercentBased": true,
               "DiscountPercent": 10
            }
         }
      ],
      "ProjectRef": {
         "value": "493722274"
      },
      "CustomerRef": {
         "value": "13"
      },
      "TxnTaxDetail": {
      "TotalTax": 0
      },
      "ApplyTaxAfterDiscount": false
   }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
   {
      "Estimate": {
         "domain": "QBO",
         "sparse": false,
         "Id": "14",
         "SyncToken": "0",
         "MetaData": {
            "CreateTime": "2024-12-31T09:18:57-08:00",
            "LastUpdatedTime": "2024-12-31T09:18:57-08:00"
         },
         "CustomField": [],
         "TxnDate": "2024-12-31",
         "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
         },
         "TxnStatus": "Pending",
         "Line": [
            {
               "Id": "1",
               "LineNum": 1,
               "Description": "Pest Control Services",
               "Amount": 35.00,
               "DetailType": "SalesItemLineDetail",
               "SalesItemLineDetail": {
                  "ItemRef": {
                     "value": "1",
                     "name": "Sales"
                  },
                  "UnitPrice": 35,
                  "Qty": 1,
                  "ItemAccountRef": {
                     "value": "5",
                     "name": "Sales"
                  },
                  "TaxCodeRef": {
                     "value": "NON"
                  }
               }
            },
            {
               "Amount": 35.00,
               "DetailType": "SubTotalLineDetail",
               "SubTotalLineDetail": {}
            },
            {
               "Amount": 3.50,
               "DetailType": "DiscountLineDetail",
               "DiscountLineDetail": {
                  "PercentBased": true,
                  "DiscountPercent": 10,
                  "DiscountAccountRef": {
                     "value": "86",
                     "name": "General business expenses:Uniforms"
                  }
               }
            }
         ],
         "ProjectRef": {
            "value": "493722274"
         },
         "CustomerRef": {
            "value": "14",
            "name": "Demo Address Test 3"
         },
         "CustomerMemo": {
            "value": "Thank you for your business and have a great day!"
         },
         "BillAddr": {
            "Id": "13",
            "Line1": "65 Ocean Dr.",
            "City": "Half Moon Bay",
            "CountrySubDivisionCode": "CA",
            "PostalCode": "94213"
         },
         "ShipAddr": {
            "Id": "14",
            "Line1": "65 Ocean Dr.",
            "City": "Half Moon Bay",
            "CountrySubDivisionCode": "CA",
            "PostalCode": "94213"
         },
         "FreeFormAddress": true,
         "ShipFromAddr": {
            "Id": "15",
            "Line1": "2600 Marine Way",
            "Line2": "Mountain View, CA  94043-1126",
            "Line3": "USA"
         },
         "TotalAmt": 31.50,
         "ApplyTaxAfterDiscount": false,
         "PrintStatus": "NeedToPrint",
         "EmailStatus": "NotSet",
         "BillEmail": {
            "Address": "Cool_Cars@intuit.com"
         }
      },
      "time": "2024-12-31T09:18:56.821-08:00"
   }
Use case 3: Attach a bill to a project

Step 1: Create or read a project. Use projectManagementCreateProject (mutation) or projectManagementProject (query).

Step 2: Create a bill using the Accounting REST API and set the ProjectRef attributes with values from the project. For information about referencing a project to a bill, see Bill.

Create bill request using ProjectRef

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
   {
      "Line": [
         {
            "DetailType": "AccountBasedExpenseLineDetail",
            "Amount": 200.0,
            "Id": "1",
            "ProjectRef":
               {
                  "value": "493722274"
               },
            "AccountBasedExpenseLineDetail": {
               "AccountRef": {
                  "value": "7"
               }
            }
         }
      ],
      "VendorRef": {
         "value": "15"
      }
   }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
   {
      "Bill": {
         "DueDate": "2024-12-31",
         "VendorAddr": {
            "Id": "16",
            "Line1": "Dianne's Auto Shop",
            "Line2": "Dianne Bradley",
            "Line3": "29834 Mustang Ave.",
            "City": "Millbrae",
            "Country": "U.S.A",
            "CountrySubDivisionCode": "CA",
            "PostalCode": "94030"
         },
         "Balance": 200.00,
         "domain": "QBO",
         "sparse": false,
         "Id": "15",
         "SyncToken": "0",
         "MetaData": {
            "CreateTime": "2024-12-31T09:31:19-08:00",
            "LastModifiedByRef": {
               "value": "9341453183669693"
            },
            "LastUpdatedTime": "2024-12-31T09:31:19-08:00"
         },
         "TxnDate": "2024-12-31",
         "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
         },
         "Line": [
            {
               "Id": "1",
               "LineNum": 1,
               "Amount": 200.00,
               "LinkedTxn": [],
               "DetailType": "AccountBasedExpenseLineDetail",
               "AccountBasedExpenseLineDetail": {
                  "AccountRef": {
                     "value": "7",
                     "name": "Billable Expense Income"
                  },
                  "BillableStatus": "NotBillable",
                  "TaxCodeRef": {
                     "value": "NON"
                  }
               },
               "ProjectRef": {
                  "value": "493722274"
               }
            }
         ],
         "VendorRef": {
            "value": "15",
            "name": "Dianne's Auto Shop"
         },
         "APAccountRef": {
            "value": "20",
            "name": "Accounts Payable (A/P)"
         },
         "TotalAmt": 200.00
      },
      "time": "2024-12-31T09:31:18.555-08:00"
   }
Use case 4: Attach a sales receipt to a project

Step 1: Create or read a project. Use projectManagementCreateProject (mutation) or projectManagementProject (query).

Step 2: Create a sales receipt using the Accounting REST API and send the ProjectRef attributes with values from the project. For information about referencing a project to a sales receipt, see SalesReceipt.

Create sales receipt request using ProjectRef

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
   {
      "Line": [{
         "Id": "1",
         "LineNum": 1,
         "Description": "Pest Control Services",
         "Amount": 35.0,
         "DetailType": "SalesItemLineDetail",
         "ProjectRef": {
            "value": "493722274"
         },
         "SalesItemLineDetail": {
            "ItemRef": {
               "value": "1",
               "name": "Pest Control"
            },
            "UnitPrice": 35,
            "Qty": 1,
            "TaxCodeRef": {
               "value": "NON"
            }
         }
      }]
   }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
   {
      "SalesReceipt": {
         "domain": "QBO",
         "sparse": false,
         "Id": "16",
         "SyncToken": "0",
         "MetaData": {
            "CreateTime": "2025-01-02T09:39:14-08:00",
            "LastUpdatedTime": "2025-01-02T09:39:14-08:00"
         },
         "CustomField": [],
         "TxnDate": "2025-01-02",
         "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
         },
         "Line": [
            {
               "Id": "1",
               "LineNum": 1,
               "Description": "Pest Control Services",
               "Amount": 35.00,
               "DetailType": "SalesItemLineDetail",
               "SalesItemLineDetail": {
                  "ItemRef": {
                     "value": "1",
                     "name": "Sales"
                  },
                  "UnitPrice": 35,
                  "Qty": 1,
                  "ItemAccountRef": {
                     "value": "5",
                     "name": "Sales"
                  },
                  "TaxCodeRef": {
                     "value": "NON"
                  }
               }
            },
            {
               "Amount": 35.00,
               "DetailType": "SubTotalLineDetail",
               "SubTotalLineDetail": {}
            }
         ],
         "ShipFromAddr": {
            "Id": "17",
            "Line1": "2600 Marine Way",
            "Line2": "Mountain View, CA  94043-1126",
            "Line3": "USA"
         },
         "TotalAmt": 35.00,
         "ApplyTaxAfterDiscount": false,
         "PrintStatus": "NeedToPrint",
         "EmailStatus": "NotSet",
         "Balance": 0,
         "DepositToAccountRef": {
            "value": "18",
            "name": "Payments to deposit"
         }
      },
      "time": "2025-01-02T09:39:14.026-08:00"
   }