Data Types

The NAM API data types include standard primitives, basic types, and resources. The NAM API is strict about nullability requirements - some API inputs and outputs are nullable, while others are required. In the complete reference, types are assumed to be non-nullable by default. If they are nullable, the type definition includes | null .

The following are the primitive types supported in the API:

  • Integer - a signed 32-bit integer, represented directly as a number in JSON payloads. In the documentation below, this type is represented as int
  • Long - a signed 64-bit integer, represented directly as a number in JSON payloads. In the documentation below, this is represented as long
  • String - a double-quote delineated string. In the documentation below, this is represented as string
  • Boolean - either true or false. In the documentation below, this is represented as bool

The following are basic scalar types specific to the NAM API:

  • AdsId - A string representing a unique identifier for NAM resources. NAM IDs are unique, opaque identifiers across all objects in the API (e.g. "139845984734598"). In the documentation below, this is represented as adsId
  • LocalDate - A string representing a local date in ISO8601 format (e.g. "2023-06-22"). In the documentation below, this is represented as localDate
  • LocalTime - A string representing a local time (e.g. clock time) in ISO8601 format, with hours, minutes, and seconds (e.g. "13:37:00"). In the documentation below, this is represented as localTime
  • LocalDateTime - A string representing the combination of a local date and local time, in ISO8601 format (e.g. "2023-06-22T13:37:00"). Note that this does not include any timezone or offset information, and as such cannot represent an unambiguous point in time on the Epoch timeline. In the documentation below, this is represented as localDateTime
  • Instant - A string representing a UTC Instant on the Epoch timeline, in ISO8601 format (e.g. "2023-06-22T13:37:00Z"). In the documentation below, this is represented as instant
  • ZonedDateTime - A string representing an Instant on the Epoch timeline, with complete offset and timezone information, in ISO8601 format extended with a timezone id (e.g. "2023-06-22T13:37:00-07:00[America/Los_Angeles]"). Timezone IDs come from the IANA Timezone database, and are represented in square brackets at the end of the string. In the documentation below, this is represented as zonedDateTime
  • Duration - A string representing a time interval, in ISO8601 duration format (e.g. "PT20.345S"). In the documentation below, this is represented as duration
  • ZoneId - A string directly representing a Timezone ID from the IANA Timezone database (e.g. "[America/New_York]"). In the documentation below, this is represented as zoneId
  • Money - A string representing a monetary amount. The NAM API always expects and returns monetary amounts as ISO4217 currency units followed by arbitrary-precision decimal values (e.g. "USD 10"). In the documentation below, this is represented as money
  • CurencyUnit - A string representing only an individual currency unit, as an ISO4127 currency code (e.g. "USD" or "EUR"). In the documentation below, this is represented as currencyUnit

In addition to primitive and custom scalar types, the NAM API also has a few custom types to support pagination:

  • PaginationParameters - these are standard parameters like cursor and page_size used across all endpoints that support pagination.
  • PageInfo - these are standard parameters like end_cursor and page_size used across all endpoints that support pagination.

Finally, the NAM API exposes the following resources:

  • Profile - the profile, which could be an agency, that owns other advertisers
  • Advertiser - the entity that owns its own namespaced campaigns, creatives, etc
  • Campaign - mapping of AdGroup(s) that serve end Ad(s)
  • AdGroup - a group of Ad(s) that are set to serve Creative(s), also holds targeting info, budget, etc
  • Ad - the actual Ad that is being served to end users on Nextdoor
  • Creative - the visual users see on the Nextdoor app which includes an image, logo, and text data
  • Media - the media, such as an image, that can be referenced for our creatives
    Report - a CSV report