So Intuit built their QBO Customer API to use the same URL for two distinctly different actions: Create (POST) and Update (also, POST for some reason).
#Request URL
POST /v3/company/<realmID>/customer
Content type:application/json
Production Base URL:https://quickbooks.api.intuit.com
Sandbox Base URL:https://sandbox-quickbooks.api.intuit.com
#Request Body
{
"FullyQualifiedName": "King Groceries",
"PrimaryEmailAddr": {
"Address": "jdrew@myemail.com"
},
"DisplayName": "King's Groceries",
"Suffix": "Jr",
"Title": "Mr",
"MiddleName": "B",
"Notes": "Here are other details.",
"FamilyName": "King",
"PrimaryPhone": {
"FreeFormNumber": "(555) 555-5555"
},
"CompanyName": "King Groceries",
"BillAddr": {
"CountrySubDivisionCode": "CA",
"City": "Mountain View",
"PostalCode": "94042",
"Line1": "123 Main Street",
"Country": "USA"
},
"GivenName": "James"
}
# Request URL
POST /v3/company/<realmID>/customer
Content type:application/json
Production Base URL:https://quickbooks.api.intuit.com
Sandbox Base URL:https://sandbox-quickbooks.api.intuit.com
# Request Body
{
"domain": "QBO",
"PrimaryEmailAddr": {
"Address": "Surf@Intuit.com"
},
"DisplayName": "Bill's Windsurf Shop",
"PreferredDeliveryMethod": "Print",
"GivenName": "Bill",
"FullyQualifiedName": "Bill's Windsurf Shop",
"BillWithParent": false,
"Job": false,
"BalanceWithJobs": 85.0,
"PrimaryPhone": {
"FreeFormNumber": "(415) 444-6538"
},
"Active": true,
"MetaData": {
"CreateTime": "2014-09-11T16:49:28-07:00",
"LastUpdatedTime": "2015-07-23T11:07:55-07:00"
},
"BillAddr": {
"City": "Half Moon Bay",
"Line1": "12 Ocean Dr.",
"PostalCode": "94213",
"Lat": "37.4307072",
"Long": "-122.4295234",
"CountrySubDivisionCode": "CA",
"Id": "3"
},
"MiddleName": "Mac",
"Taxable": false,
"Balance": 85.0,
"SyncToken": "3",
"CompanyName": "Bill's Windsurf Shop",
"FamilyName": "Lucchini",
"PrintOnCheckName": "Bill's Wind Surf Shop",
"sparse": false,
"Id": "2"
}
Really, it looks like it determines if it is an update if the "Id" key is present in the body. That is the only distinction as to if it should update a record.
So, at any rate, I need a Create and an Update action. The Customer Connector will not allow this because they share the same URL.
What are my options here?
Seems like the last option is going to be the case. If so, how do I add a request body from a Flow?
Ok, submitted a ticket. But my work around for the time being is in the custom connector, when I declare the request, I just have the body as:
{
}
That way, I can write out the request body in the flow. Kind of a hassle, but the issue as far as I can tell are two things:
At any rate...
Hi,
Looking at both of your issues here, it seems like you have some kind of overall issue wit how you have your custom connector set up. I'm not certain exactly if there is something wrong with how you have it set up or if its a limitation with the connection itself. I would recommend creating a Microsoft Support request on this. I'll include a link below; on how to do so if you would like to go down that route. Otherwise if any communities members might know what the issue feel free to chime in.
If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support
Regards,
Alex
-------
Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.