Get booking requirements
Which details a service needs on a lane: address extras, customs, tax and shop ids, as paths in the order input. Call after the user picks a service from get_quotes, with the from/to codes it returned.
Request
| Field | Type | Notes |
|---|---|---|
serviceSlug required | string | slug from get_quotes |
from required | string | from code get_quotes returned |
to required | string | to code get_quotes returned |
includeOptional | boolean | Also list optional fields in full Default: false. |
Examples
curl "https://p2g-mcp-sandbox.dotnethelp.workers.dev/v1/services/dpd-classic/GB/DE/requirements"
As an MCP tool call over POST /mcp:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_booking_requirements",
"arguments": {
"serviceSlug": "dpd-classic",
"from": "GB",
"to": "DE"
}
}
}
Response
| Field | Type | Notes |
|---|---|---|
service required | string | |
from required | string | |
to required | string | |
international required | boolean | True when a customs declaration is needed |
address required | string | Address fields both sides need |
parcels required | string | Fields every parcel needs |
fields required | object[] | Other required or conditionally required fields |
fields[].paths required | string[] | Where the value goes in the order input; all share these rules |
fields[].required required | true | false | string | true, false, or "if <condition>" |
fields[].type | "integer" | "decimal" | "boolean" | |
fields[].options | string[] | Allowed values |
fields[].maxLength | integer | |
fields[].minLength | integer | |
fields[].format | string | |
fields[].note | string | |
optional | string[] | Optional field paths (includeOptional for details) |
shops | object | Drop-shop ids this service takes: from = sender's drop-off shop, to = receiver's pick-up shop |
shops.from | object | |
shops.from.provider required | string | Pass to search_drop_shops as provider |
shops.from.required required | boolean | |
shops.to | object | |
shops.to.provider required | string | Pass to search_drop_shops as provider |
shops.to.required required | boolean | |
customs | object | |
customs.dutyTerms required | string[] | Allowed customs.dutyTerms |
customs.ddpAdminFee | object | |
customs.ddpAdminFee.minor required | integer | Amount in minor units (pence, cents) |
customs.ddpAdminFee.currency required | string | ISO 4217 code, e.g. GBP |
customs.ddpAdminFee.display required | string | Formatted, e.g. £12.16 |
customs.giftAllowance | object | Gifts up to this value are usually free of duty |
customs.giftAllowance.minor required | integer | Amount in minor units (pence, cents) |
customs.giftAllowance.currency required | string | ISO 4217 code, e.g. GBP |
customs.giftAllowance.display required | string | Formatted, e.g. £12.16 |
customs.tariffCode | string | |
notes | string[] |
Errors
Errors are problem JSON. Each issue names the field to fix and how to fix it. See every error code and its fix.