invalid_param

A single path parameter (typically an id) failed validation.

HTTP 400The request was malformed.

When it fires

A single named parameter — almost always a path segment id — failed validation. The most common case is a non-numeric id sent to an endpoint that expects an integer:

  • /v1/channels/airbnb/listings/abc — listing id must be a number.
  • /v1/channels/booking/properties/{id} with a UUID instead of an integer.
  • /v1/channels/vrbo/listings/{id}/pricing when the id is blank or contains a dash.

invalid_param is the singular sibling of invalid_params — same idea, but for one specific path field instead of a query string parameter.

Response shape

Every Repull error follows the same envelope. The code is stable and safe to switch on.

{
  "error": {
    "code": "invalid_param",
    "message": "<human-readable explanation of what went wrong>",
    "docs_url": "https://repull.dev/docs/errors/invalid_param"
  }
}

How to fix

  1. Read err.message — it names the field and the rule (e.g. "Listing ID must be a number").
  2. List the parent collection first to confirm the id format the workspace actually uses (`GET /v1/channels/airbnb/listings`).
  3. If you copied the id from a webhook payload, re-check the field name — channel ids and Repull ids use different formats.
  4. Strip any URL-encoding artefacts (e.g. `%20` from a trailing space pasted in a shell).

Common gotchas

  • Channel-side ids can be very large numbers — make sure your client treats them as strings, not 32-bit ints. Airbnb listing ids in particular overflow Number on Java/JavaScript without explicit handling.
  • invalid_param never fires on query-string params. If a query param is wrong, you will see invalid_params instead.

Examples

curl

# Bad: non-numeric listing id
curl https://api.repull.dev/v1/channels/airbnb/listings/abc \
  -H "Authorization: Bearer sk_test_YOUR_KEY"

# {
#   "error": {
#     "code": "invalid_param",
#     "message": "Listing ID must be a number"
#   }
# }

# Good
curl https://api.repull.dev/v1/channels/airbnb/listings/6248 \
  -H "Authorization: Bearer sk_test_YOUR_KEY"

TypeScript

import { Repull } from '@repull/sdk'

const repull = new Repull({ apiKey: process.env.REPULL_KEY! })

try {
  await repull.channels.airbnb.listings.get('abc')
} catch (err: any) {
  if (err.code === 'invalid_param') {
    // err.message names the field. Don't retry verbatim — fix the id format.
    console.error('Bad path parameter:', err.message)
  }
  throw err
}

If you're an AI agent

A path segment (usually an id) was the wrong shape. Read err.message for the field name. List the parent collection to find a real id, then call again with that — do not retry the malformed value.

Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.

AI