CRM Data with Rest API
Hi guys I recently created an app with SuperOffice and did the authentication with Vuejs. Currently I am trying to retrieve sales data, but with the requests I make, I either get an example response with an example sale, or the URL is incorrect and an error occurs when I specify an ID as a parameter.
Also have the same issue when fetching all Contact. Am I overseeing something?
The request is as follows:
endpoint:
'https://sod2.superoffice.com/Custxxxx/api/v1/sale'
header:
Authorization: Bearer {access token}
Accept: ‘application/json’
Alles Antwoorden (6)
Hi John,
Looks like you are missing the saleId...
If you are new to RESTful web services, the documentation does contain a high/level overview and explaination of the SuperOffice web service endpoints and application server.
We have provided a large number of examples on our github organization, specifically the RESTful-HTTP-Queries repo.
Some shortcuts:
Learn how to search using the OData queries.
Most importantly, read the Best Practices page.
Hope this helps!
Hi Tony,
Thanks for your reply.
The requests that can be found on Github were very helpful, thank you for that.
But the actual problem was not solved. For example, if I want a list of all sales, I only get an example sale. Also with this request
URL: GET https://{{env}}.superoffice.com/{{tenant}}/api/v1/sale?$top=100
This should actually give me a list of the first 100 sales but I get a response: 200, with the description: "This is just an example sale!"
I know that there are a number of sales tahat exists, as I should receive. It is unclear to me how to receive the correct data instead of the supposed Dummy data.
I hope that my point is understandable
Hi John,
I too have a SOD tenant with a few thousand sales, but I am not able to reproduce your results. I get the expected results.
Hi John,
I have looked into your SOD tenant and can confirm that you only have two sales, and the first one does have a description "This is just an example sale!".
You should also have the second one, with a description "Sale Text Two".
Best regards.
Hi John,
I think you are confusing SuperOffice Environments. Your application is only authorized in the SuperOffice Development (SOD) environment (sod.superoffice.com), while your company has a production tenant in the SuperOffice Online environment (online.superoffice.com).
You must first developer your custom applications in the SOD environment, and only after it has passed Validation checks can it be promoted to operate toward your tenant in the production environment.
Please refer to the Developer Portal documentation for more information about Custom Apps.