Skip to main content

Get the sales rep on reservations in the API

Read each reservation's sales rep through the DoorSpot API, expand the rep's details, and filter reservations by rep and created date.

Every reservation the DoorSpot API returns includes the sales rep credited with it. Use this to report on reservations by sales rep from another tool, using the same rep attribution as the Bookings dashboard's sales rep chart.

Before you begin

  • You need an API key with Read access to Reservations. To create one, go to Settings → Developer and click Create API key.

  • Requests go to https://api.doorspot.com/api/v1 with the header Authorization: Bearer your_api_key_here.

Read the sales rep on a reservation

  1. Send GET /reservations/{id} for one reservation, or GET /reservations for a list.

  2. Read sales_rep_id on each reservation. It is the rep's contact ID, starting cont_, or null when no rep is assigned.

  3. To get the rep's name and other contact details in the same response, add ?expand=sales_rep. Each reservation then also includes sales_rep: the rep's contact, or null when no rep is assigned.

Filter the reservation list

Add these query parameters to GET /reservations:

  • sales_rep_id: a contact ID (cont_...) as returned in sales_rep_id. Returns only that rep's reservations. A contact that isn't a staff user in your account matches nothing, so you get an empty list.

  • created_from and created_to: dates in YYYY-MM-DD format. They filter on the day each reservation was created, include both end days, and use your account's time zone. created_to can't be earlier than created_from.

Example: GET /reservations?sales_rep_id=cont_01HWXYZ&created_from=2026-03-01&created_to=2026-03-31&expand=sales_rep

Good to know

  • On reservation endpoints, expand accepts sales_rep and custom_fields. See Read custom field values through the API.

  • Keys with Use with AI turned on are AI Bot tokens. They still receive sales_rep_id, but names in responses, including the expanded rep's name, are pseudonymized.

Troubleshooting

  • 422 error. Check for an expand value other than sales_rep or custom_fields, a malformed filter value, or a created_to date before created_from.

  • 403 error. The key doesn't have Read access to Reservations. Update its permissions in Settings → Developer.

  • Empty list for a rep. Check that the ID is the rep's cont_ contact ID, copied from sales_rep_id on a reservation.

Related articles

Did this answer your question?