APIs & Integrations

cbsync
Membro

/crm/v3/properties/company|contact|deal sort order

resolver

I'm curious what the default sort order for the following endpoints are as it does not seem to be documented:

/crm/v3/objects/companies

/crm/v3/objects/contacts

/crm/v3/objects/deals

/crm/v3/objects/owners

 

Also is it possible to sort these by a different field?

0 Avaliação positiva
1 Solução aceita
WendyGoh
Solução
HubSpot Employee
HubSpot Employee

/crm/v3/properties/company|contact|deal sort order

resolver

Hey @cbsync,

 

The default sorting of these endpoints is probably from the oldest record to the newest. 

 

You can set the sort rule by a different property. Here's an example:

 

POST /crm/v3/objects/contacts/search

 

POST body

 

{
    "sorts": [
      {
        "propertyName": "createdate",
        "direction": "DESCENDING"
      }
    ]
  }

Exibir solução no post original

0 Avaliação positiva
3 Respostas 3
pravinthakare
Participante

/crm/v3/properties/company|contact|deal sort order

resolver

just checking on this if it possible to do the sorting on the comapnies list without using search API
ex. fetch recently updated companies .

0 Avaliação positiva
WendyGoh
Solução
HubSpot Employee
HubSpot Employee

/crm/v3/properties/company|contact|deal sort order

resolver

Hey @cbsync,

 

The default sorting of these endpoints is probably from the oldest record to the newest. 

 

You can set the sort rule by a different property. Here's an example:

 

POST /crm/v3/objects/contacts/search

 

POST body

 

{
    "sorts": [
      {
        "propertyName": "createdate",
        "direction": "DESCENDING"
      }
    ]
  }
0 Avaliação positiva
vikram-mit
Participante

/crm/v3/properties/company|contact|deal sort order

resolver

but that is using the serch api. I am like OP looking for object apis like https://api.hubapi.com/crm/v3/objects/companies 

is it possible to sort ?