How do I fetch info on sales connected to a given project via API?

lock
push_pin
done
Answered
1

Hi

I am trying to fetch sales connected to a project via the API, but could not find the correct URL for this request.

In SuperOffice web it is possible to connect a sale to a given project.

Can anyone help me understand how I can get information about the connected sales to a given project via the API?

 

Requests URLs I use for fetching information about sales and projects, respectively:

https://online.superoffice.com/CustXXXXX/api/v1/Sale (GET)

https://online.superoffice.com/CustXXXXX/api/v1/Project (GET)

6 Mar 2023 | 11:32 AM

All Replies (1)

You can link projects to a sale, or a sale to a project. 

Linking a project to a Sale:

 

Linking a Sale to a Project:

 

Using the entity endpoint API by id, you have to look at the projects Links property to see all possible "connections" to the entity.

GET https://{{env}}.superoffice.com/{{tenant}}/api/v1/project/246010
Authorization: Bearer {{token}}
Accept: application/json

 

The EntityName and Id indicate what the connected entity is and its ID value for lookup.

 

Alternatively, use the Links endpoint directly on the entity, which will give additional ID infomation about the entity.

GET https://{{env}}.superoffice.com/{{tenant}}/api/v1/project/246010/Links
Authorization: Bearer {{token}}
Accept: application/json

 

Hope this helps!

 

7 Mar 2023 | 06:05 AM
Thanks Tony, this is helpful.
7 Mar 2023 | 12:05 PM

Add reply