Notes

class ab.api.endpoints.notes.NotesEndpoint(client)[source]

Global note operations (ACPortal API).

Forward references:

  • api.lookup.get_refer_categories -> NoteRequest.category

  • suggest_users() -> NoteRequest.assigned_users (by id)

Parameters:

client (HttpClient)

list(*, category=None, job_id=None, contact_id=None, company_id=None)[source]

List notes (GET /note).

Swagger marks every filter optional, but the live API requires at least one of category, job_id, contact_id, or company_id – omitting them all returns HTTP 400. The SDK relays whatever the caller passes; it does not impose this rule.

Parameters:
  • category (list[str] | None) – One or more category UUIDs (repeated query param).

  • job_id (str | None) – Filter to notes attached to this job UUID.

  • contact_id (int | None) – Filter to notes attached to this contact ID.

  • company_id (str | None) – Filter to notes attached to this company UUID.

Return type:

list[GlobalNote]

Docs: https://ab-sdk.readthedocs.io/en/latest/api/notes/list.html Query params: NotesListParams Response model: List[GlobalNote]

create(*, data)[source]

Create a note (POST /note).

Parameters:

data (NoteRequest | dict) – Note payload. Accepts a NoteRequest instance or a dict. comments and category are required by swagger; the request model enforces this.

Return type:

GlobalNote

Request model: NoteRequest (same schema as update).

Docs: https://ab-sdk.readthedocs.io/en/latest/api/notes/create.html Request model: NoteRequest Response model: GlobalNote

update(note_id, *, data)[source]

Update a note (PUT /note/{id}).

The API uses the same NoteRequest schema as create, so comments and category are required on update too – partial updates are not supported by this endpoint.

Parameters:
  • note_id (str) – Note identifier (path param).

  • data (NoteRequest | dict) – Note payload. Accepts a NoteRequest instance or a dict.

Return type:

GlobalNote

Request model: NoteRequest (same schema as create).

Docs: https://ab-sdk.readthedocs.io/en/latest/api/notes/update.html Request model: NoteRequest Response model: GlobalNote

suggest_users(search_key, *, job_franchisee_id=None, company_id=None)[source]

Suggest users for mentions (GET /note/suggestUsers).

search_key is required by swagger; it is positional here so it cannot be silently omitted.

Returns rows whose id feeds NoteRequest.assigned_users.

Docs: https://ab-sdk.readthedocs.io/en/latest/api/notes/suggest_users.html Query params: NotesSuggestUsersParams Response model: List[SuggestedUser]

Parameters:
  • search_key (str)

  • job_franchisee_id (str | None)

  • company_id (str | None)

Return type:

list[SuggestedUser]

Per-endpoint reference

Each route-backed method has its own page rendering the HTTP route, the Python and CLI call signatures, and the request/response model field tables. This is the page help(api.notes.<method>) links to via its Docs: footer. These pages are generated by scripts/generate_endpoint_docs.py and kept current by a CI freshness gate.

Methods

list

GET /note — List global notes with optional filters.

Returns: list[GlobalNote]`

# List all notes
notes = api.notes.list()

# Filter by job
notes = api.notes.list(jobId="job-uuid")

create / update

POST /note / PUT /note/{id} — Create and update notes.

Returns: GlobalNote

note = api.notes.create(comment="New note", category="General")
api.notes.update("note-id", comment="Updated")

suggest_users

GET /note/suggestUsers — User suggestions for mentions.

Returns: list[SuggestedUser]`