Booking

Book a visit

Books a slot from find_times. The server reprices and rechecks the slot. CARD → PENDING with a payUrl for the person to open (Payfast). CASH → needs confirm: true (else 409 CONFIRM_REQUIRED with the summary) and is PENDING with CASH_DUE.

post/v1/bookings

Request

  • Base URL: https://api.nogpets.com
  • URL: https://api.nogpets.com/v1/bookings
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://api.nogpets.com/oauth/authorize, token URL https://api.nogpets.com/oauth/token, scopes: bookings:write)
    • HTTP bearer

Request body

categorystring required

A service line id: grooming, walking or sitting.

addressIdstring required
startstring date-time

A slot's start from find_times, unchanged.

resourceIdstring

The slot's resourceId, unchanged.

paymentMethod'CARD' | 'CASH' required
notesstring
confirmboolean

Cash only: true once the person said yes to the summary.

promoCodestring

The code from the quote. A code that no longer applies is a 409 PROMO (details.reason). Left out, a claimed offer is applied if it fits.

Example request

{
  "category": "grooming"
}

Response

Booked

bookingIdstring required
bookingIdsstring[] required

Every week booked (repeats).

seriesIdstring nullable
status'PENDING' | 'ACCEPTED' | 'REJECTED' | 'CANCELLED' | 'COMPLETED' required
paymentMethod'CARD' | 'CASH' required
paymentStatus'PENDING' | 'PAID' | 'CASH_DUE' | 'CASH_RECEIVED' | 'REFUND_REQUESTED' | 'REFUNDED' | 'FAILED' required
totalCentsinteger required
totalstring required
planobject nullable

A stay or visits over days: {mode, label, count}.

startstring date-time required
whenstring required
skippedstring[]

Repeat weeks that were full.

payUrlstring uri nullable required

Card: the link the person opens to pay (48 hours).

nextstring required

What to tell the person.

Example response

{
  "discount": {
    "code": "WELCOME30"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.