---
title: "One day's visits in order, per van or walker"
method: GET
path: "/v1/business/day-plan"
tags: ["Run"]
---

# One day's visits in order, per van or walker

`GET /v1/business/day-plan`

## Request

- Base URL: `https://api.nogpets.com`
- URL: `https://api.nogpets.com/v1/business/day-plan`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.nogpets.com/oauth/authorize`, token URL `https://api.nogpets.com/oauth/token`, scopes: `business:manage`)
  - HTTP bearer

For one day (default today, the business's time zone): each van, walker or sitter's hours, time off and visits in order with times, address, pets, services, notes, payment due, the gap before each visit and the straight-line distance from the last one. Needs business:manage; the signed-in person must be an owner, manager or staff member of an approved NogPets business (bizId only if they run more than one).

## Query parameters

- `bizId` string
- `date` string: A local date, YYYY-MM-DD.
- `resourceId` string

## Response `200`

OK

- DayPlan
  - `business` BizRef
    - `bizId` string
    - `name` string
    - `role` string: owner, manager or crew (staff).
    - `country` string
    - `countryName` string
    - `currency` string
    - `timezone` string
    - `canTakeBookings` boolean: False outside South Africa for now: bookings there aren't taken through NogPets.
  - `date` string
  - `label` string
  - `note` string
  - `plan` object[], required
    - `resourceId` string
    - `name` string
    - `kind` string
    - `paused` boolean
    - `hours` string[]
    - `timeOff` object[]
      - `id` string
      - `from` string
      - `to` string
      - `wholeBusiness` boolean
      - `reason` string
    - `stops` Stop[]
      - `bookingId` string
      - `time` string: 09:00–10:15, local.
      - `start` string
      - `end` string
      - `status` string
      - `client` object
        - `id` string
        - `name` string
        - `phone` string
      - `address` string
      - `addressNotes` string
      - `mapUrl` string, nullable: The stop on Google Maps (its stored point, else the address).
      - `point` object, nullable: The stop's stored location, when there is one (for a map).
        - `lat` number
        - `lng` number
      - `pets` object[]
        - `name` string
        - `type` string
        - `weightKg` number
        - `coat` string
        - `services` string[]
      - `notes` string
      - `payment` object
        - `method` string
        - `status` string
        - `due` string
      - `gapBeforeMin` integer, nullable
      - `kmFromPrevious` number, nullable: Straight-line km from the stop before.
      - `tight` boolean: The gap is shorter than the travel time set.
    - `directionsUrls` string[]: Google Maps driving directions through the stops still to do, in order, starting where the phone is. At most 9 stops between start and end per link; a longer day has more than one, each starting at the last one's end.
    - `summary` string

## Other responses

- `400`: The input is wrong (`INVALID_ARGUMENT`, or a pricing code such as `ONE_PRIMARY`, `PET_TYPE`, `UNKNOWN_SERVICE`).
- `401`: No token, or it's expired or revoked. The `WWW-Authenticate` header points at the resource metadata.
- `403`: The token lacks a scope (`INSUFFICIENT_SCOPE`, with `details.scope`).
- `404`: Not found, or not the person's.
- `409`: A rule said no: `NO_COVERAGE`, `NO_AVAILABILITY`, `SLOT_TAKEN`, `TOO_LATE`, `CONFIRM_REQUIRED` (with `details.summary`), `NOTHING_TO_PAY`, `SHOP_OFF`, `STOCK`, `SHIPPING`, `DISCOUNT`, `CASH`, `FAILED_PRECONDITION`; business sign-up: `UNDER_REVIEW`, `APPROVED`, `NOT_READY`, `TOO_MANY`, `LISTING_TAKEN`, `PAYFAST_ZA_ONLY`. `NO_COVERAGE` carries `details.leadId`, `details.message` (tell the person) and `details.next`.

---

[API](https://skmtc.dev/nogpets/apis/nogpets-api.md) · [All operations](https://skmtc.dev/nogpets/apis/nogpets-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nogpets/apis/nogpets-api/revisions/a202c1012173?raw)
