Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Company page migration
- This gist list the calls made in the company page. For each call, it provides the equivalent following the new API convention.
- ## api/v1/companies/:id
- **Relationships**
- - Company
- - Deals
- - Currency
- - Prices
- - Product
- - Stages
- - Pipeline
- - Stages
- - Owner
- - People
- We do not use data from `Deals.Currency` and `Deals.Prices.Product` on this page, I think we can avoid fetching it.
- **Translation to the new API**
- This API call should not require changes to be compliant with the new API. Although we can avoid fetching the extra data that it is not used on the page.
- ```
- /api/v1/companies/11?include=deals.currency,deals.prices.product,deals.stage.pipeline.stages,owner,people
- ```
- ## api/v1/companies/:id/aggregations/events
- This is common to all the pages that leverage the Entry component. It is responsible for fetching the timeline events related to the entity.
- **Relationships**
- - activityType
- - assignees
- - contacts
- - company
- - contact
- - company
- - creator
- - owner
- I think `contacts.company` and `company` are not necessary here.
- **Translation to the new API**
- The only change that needs to be done here is the use of `pageSize` query parameter instead of `page[limit]`
- ```
- /api/v1/companies/11/aggregations/events?include=activityType,assignees,contacts.company,contact,company,creator,owner&pageSize=8
- ```
Add Comment
Please, Sign In to add comment