APIs & Integrations

cbsync
Miembro

/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 Me gusta
1 Soluciones aceptada
WendyGoh
Solución
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"
      }
    ]
  }

Ver la solución en mensaje original publicado

0 Me gusta
3 Respuestas 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 Me gusta
WendyGoh
Solución
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 Me gusta
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 ?