Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Lists API getAll(), getByName(), and doSearch() only return results not tagged deleted (deletedAt not set)

Aperta
#486 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
api

Direzione di ricerca

Inizia con i metodi getAll(), getByName() e getById() di ListsApi nel client hubspot-api-php, quindi confronta la gestione di deletedAt usando gli ID delle liste forniti, 68 e 10. Riproduci le tre chiamate e verifica eventuali contratti API o test esistenti. Il lavoro è completato quando la discrepanza è confermata e il comportamento previsto o la modifica richiesta al client/API è chiaramente stabilita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm not seeing anywhere in the HubSpot documentation or within the hubspot-api-php ListsApi code anything about the doSearch, getByName, and getAll methods only returning lists that have not been deleted (deletedAt is not set). Yet listsApi()->getById() will return non-deleted and deleted lists.

Is that an error? If that behavior is not an error, it would seem a significant oversight in there appears to be no ListsApi method to retrieve all lists - both non-deleted and deleted without knowing the deleted list ids.

Steps to reproduce:

$apiResponse = $client->crm()->lists()->listsApi()->getById('68', false);

{
  "list": {
    "listId": "68",
    "listVersion": 1,
    "createdAt": "2025-04-29T19:55:17.427Z",
    "updatedAt": "2025-05-02T21:00:14.271Z",
    "filtersUpdatedAt": "2025-05-02T19:27:02.547Z",
    "deletedAt": "2025-05-02T21:00:14.271Z",
    "processingStatus": "PROCESSING",
    "createdById": "5709857",
    "updatedById": "5709857",
    "processingType": "MANUAL",
    "objectTypeId": "0-1",
    "name": "Test List 04/29/25 14:55:17",
    "listPermissions": {
      "teamsWithEditAccess": [],
      "usersWithEditAccess": []
    },
    "membershipSettings": {
      "membershipTeamId": null,
      "includeUnassigned": null
    }
  }
}

But using fetch multiple lists method (passing the deleted list id "68" found above and another list id that is not deleted):

$apiResponse = $client->crm()->lists()->listsApi()->getAll(['68', '10'], false);

{
  "lists": [
    {
      "listId": "10",
      "listVersion": 1,
      "createdAt": "2024-05-20T18:11:39.227Z",
      "updatedAt": "2024-05-22T07:16:58.618Z",
      "filtersUpdatedAt": "2024-05-20T18:11:39.227Z",
      "processingStatus": "COMPLETE",
      "createdById": "5709857",
      "processingType": "MANUAL",
      "objectTypeId": "0-1",
      "name": "Sample Contact List",
      "size": 2,
      "listPermissions": {
        "teamsWithEditAccess": [],
        "usersWithEditAccess": []
      },
      "membershipSettings": {
        "membershipTeamId": null,
        "includeUnassigned": null
      }
    }
  ]
}

Using the getByName() method for the deleted list retrieved above with the getById() method:

$apiResponse = $client->crm()->lists()->listsApi()->getByName('Test List 04/29/25 14:55:17', '0-1', false);

{
  "status": "error",
  "message": "List does not exist with name Test List 04/29/25 14:55:17 and object type ID 0-1.",
  "correlationId": "b21df879-d024-41ec-b7b0-0d07de513db2",
  "context": {
    "listName": [
      "Test List 04/29/25 14:55:17"
    ],
    "objectTypeId": [
      "0-1"
    ]
  },
  "category": "OBJECT_NOT_FOUND",
  "subCategory": "ListError.LIST_NAME_DOES_NOT_EXIST"
}

Lingua principale
PHP
Stelle
243
Fork
91
Merge medio
19h 10m
PR unite (30g)
7

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HubSpot/hubspot-api-php

Tutte le issue di HubSpot/hubspot-api-php

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.