Marketplace endpoints

Browse services, book one, move your bookings along, and review or reply to reviews.

View as Markdown

All paths are relative to https://urnextdoor.com/api/v1. See API reference for the envelope and headers every endpoint shares.

EndpointWhat it doesScopeDaily quota
GET /servicesBrowse servicesbrowsenot counted
GET /services/{slug}Read a servicebrowsenot counted
POST /services/{id}/bookingsBook a servicemarketplacebooking
GET /bookingsList your bookingsmarketplacenot counted
POST /bookings/{id}/acceptAccept a bookingmarketplacenot counted
POST /bookings/{id}/declineDecline a bookingmarketplacenot counted
POST /bookings/{id}/progressStart work on a bookingmarketplacenot counted
POST /bookings/{id}/deliverDeliver a bookingmarketplacenot counted
POST /bookings/{id}/completeComplete a bookingmarketplacenot counted
POST /bookings/{id}/cancelCancel a bookingmarketplacenot counted
POST /services/{id}/reviewsReview a servicemarketplacebooking
PUT /reviews/{id}Edit your reviewmarketplaceedit
POST /reviews/{id}/replyReply to a reviewmarketplacenot counted

Browse services

GET https://urnextdoor.com/api/v1/services

Marketplace services, near your location when your profile has one.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: browse
  • Daily quota: not counted
  • operationId: listServices

Parameters

NameInRequiredDescription
categoryqueryNoA category slug.
qqueryNoWords to match.
minqueryNoLowest price, in rupees.
maxqueryNoHighest price, in rupees.
sortqueryNorecent, rating, popular, price_low or price_high.
offsetqueryNoStart of the page.
limitqueryNoItems per page (default 12).

Example

cURL
curl "https://urnextdoor.com/api/v1/services" \
  -H "Authorization: Bearer $UND_API_KEY"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/services", {
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
  },
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.get(
    "https://urnextdoor.com/api/v1/services",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/services');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OKA page of services.
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Read a service

GET https://urnextdoor.com/api/v1/services/{slug}

A service with its packages and reviews, by id or slug.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: browse
  • Daily quota: not counted
  • operationId: getService

Parameters

NameInRequiredDescription
slugpathYesThe service slug or id.
reviews_offsetqueryNoPage through reviews only.
reviews_limitqueryNo1 to 50.

Example

cURL
curl "https://urnextdoor.com/api/v1/services/rooftop-growers" \
  -H "Authorization: Bearer $UND_API_KEY"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/services/rooftop-growers", {
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
  },
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.get(
    "https://urnextdoor.com/api/v1/services/rooftop-growers",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/services/rooftop-growers');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{item, reviews, my_review, my_booking, can_review}.
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Book a service

POST https://urnextdoor.com/api/v1/services/{id}/bookings

Request a booking. The provider is notified and accepts or declines.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: counts as booking (see limits)
  • Idempotency-Key: supported (see Idempotency)
  • operationId: bookService

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/services/41/bookings" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "package_id": 7,
  "quantity": 1,
  "requirements": "A balcony of 3 by 2 metres."
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/services/41/bookings", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    package_id: 7,
    quantity: 1,
    requirements: "A balcony of 3 by 2 metres.",
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/services/41/bookings",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "package_id": 7,
        "quantity": 1,
        "requirements": "A balcony of 3 by 2 metres.",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'package_id' => 7,
    'quantity' => 1,
    'requirements' => 'A balcony of 3 by 2 metres.',
];

$ch = curl_init('https://urnextdoor.com/api/v1/services/41/bookings');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
201 Created{id, status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

List your bookings

GET https://urnextdoor.com/api/v1/bookings

Bookings you received (as a provider) or placed.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • operationId: listBookings

Parameters

NameInRequiredDescription
tabqueryNoreceived or placed.
offsetqueryNoStart of the page.
limitqueryNoItems per page (default 20).

Example

cURL
curl "https://urnextdoor.com/api/v1/bookings" \
  -H "Authorization: Bearer $UND_API_KEY"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings", {
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
  },
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.get(
    "https://urnextdoor.com/api/v1/bookings",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/bookings');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OKA page of bookings, with counts.
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Accept a booking

POST https://urnextdoor.com/api/v1/bookings/{id}/accept

Accept a booking request for your service.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: acceptBooking

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/bookings/41/accept" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings/41/accept", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/bookings/41/accept",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/bookings/41/accept');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Decline a booking

POST https://urnextdoor.com/api/v1/bookings/{id}/decline

Decline a booking request, with an optional note.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: declineBooking

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/bookings/41/decline" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "note": "Fully booked this month, sorry."
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings/41/decline", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    note: "Fully booked this month, sorry.",
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/bookings/41/decline",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "note": "Fully booked this month, sorry.",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'note' => 'Fully booked this month, sorry.',
];

$ch = curl_init('https://urnextdoor.com/api/v1/bookings/41/decline');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Start work on a booking

POST https://urnextdoor.com/api/v1/bookings/{id}/progress

Mark an accepted booking in progress.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: startBooking

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/bookings/41/progress" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings/41/progress", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/bookings/41/progress",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/bookings/41/progress');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Deliver a booking

POST https://urnextdoor.com/api/v1/bookings/{id}/deliver

Mark a booking delivered, with an optional note.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: deliverBooking

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/bookings/41/deliver" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "note": "The plan is in your messages."
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings/41/deliver", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    note: "The plan is in your messages.",
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/bookings/41/deliver",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "note": "The plan is in your messages.",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'note' => 'The plan is in your messages.',
];

$ch = curl_init('https://urnextdoor.com/api/v1/bookings/41/deliver');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Complete a booking

POST https://urnextdoor.com/api/v1/bookings/{id}/complete

Mark a booking completed (the buyer or the provider). The buyer can then review it.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: completeBooking

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/bookings/41/complete" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings/41/complete", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/bookings/41/complete",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/bookings/41/complete');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Cancel a booking

POST https://urnextdoor.com/api/v1/bookings/{id}/cancel

Cancel a booking that is not finished (the buyer or the provider).

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: cancelBooking

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/bookings/41/cancel" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/bookings/41/cancel", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/bookings/41/cancel",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/bookings/41/cancel');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, booking}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Review a service

POST https://urnextdoor.com/api/v1/services/{id}/reviews

Rate a service after a completed booking, 1 to 5 stars.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: counts as booking (see limits)
  • Idempotency-Key: supported (see Idempotency)
  • operationId: reviewService

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/services/41/reviews" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "rating": 5,
  "body": "Quick and thoughtful."
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/services/41/reviews", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    rating: 5,
    body: "Quick and thoughtful.",
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/services/41/reviews",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "rating": 5,
        "body": "Quick and thoughtful.",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'rating' => 5,
    'body' => 'Quick and thoughtful.',
];

$ch = curl_init('https://urnextdoor.com/api/v1/services/41/reviews');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
201 Created{review, rating_summary}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your review

PUT https://urnextdoor.com/api/v1/reviews/{id}

Change the rating or text of your review.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: counts as edit (see limits)
  • operationId: updateReview

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/reviews/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "rating": 4
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/reviews/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    rating: 4,
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/reviews/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "rating": 4,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'rating' => 4,
];

$ch = curl_init('https://urnextdoor.com/api/v1/reviews/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{review, rating_summary}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Reply to a review

POST https://urnextdoor.com/api/v1/reviews/{id}/reply

Reply to a review of your service. An empty reply removes it.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: marketplace
  • Daily quota: not counted
  • Idempotency-Key: supported (see Idempotency)
  • operationId: replyToReview

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/reviews/41/reply" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "reply": "Thank you, it was a pleasure!"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/reviews/41/reply", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    reply: "Thank you, it was a pleasure!",
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/reviews/41/reply",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "reply": "Thank you, it was a pleasure!",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'reply' => 'Thank you, it was a pleasure!',
];

$ch = curl_init('https://urnextdoor.com/api/v1/reviews/41/reply');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{review}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Last updated