Stuart MCP by usefulapi
Quote, validate, book and track Stuart courier deliveries; cancel jobs and check zone coverage.
Sollte ich dies verwenden
Qualität und Sicherheit
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"stuart": {
"url": "https://stuart.usefulapi.io/mcp"
}
}
}Remote-Endpunkte
https://stuart.usefulapi.io/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (15)
🟢stuart_list_jobs(status, active, client_reference, page, per_page)
List the delivery jobs of the last 90 days, newest pickup first, with status, deliveries (tracking URLs, courier proof), driver and pricing. Filter by status, active or your client_reference. Paginated: when a page returns per_page rows, ask for the next page. Stuart: GET /v2/jobs.
Eingabe-Schema
{
"type": "object",
"properties": {
"status": {
"description": "Job status filter, e.g. in_progress, finished, canceled.",
"type": "string"
},
"active": {
"description": "true = only jobs still in progress.",
"type": "boolean"
},
"client_reference": {
"description": "Your own order reference.",
"type": "string"
},
"page": {
"description": "Page number (default 1).",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"per_page": {
"description": "Rows per page (default 25).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_get_job(job_id)
One job in full: status, each delivery with tracking URL, pickup/dropoff addresses and contacts, ETA, cancellation, proof of delivery, driver, distance and pricing. Stuart: GET /v2/jobs/{jobId}.
Eingabe-Schema
{
"type": "object",
"properties": {
"job_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart job id."
}
},
"required": [
"job_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_estimate_price(pickup, dropoffs, pickup_at)
Price of a job before you create it: amount excluding and including tax, and currency. Nothing is booked. Needs pickup address, dropoff address and package type. Stuart: POST /v2/jobs/pricing.
Eingabe-Schema
{
"type": "object",
"properties": {
"pickup": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"comment": {
"description": "Note for the courier (floor, door code location, ...).",
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
}
},
"required": [
"address"
],
"description": "The single pickup point."
},
"dropoffs": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"package_type": {
"type": "string",
"enum": [
"xsmall",
"small",
"medium",
"large",
"xlarge"
],
"description": "Package size."
},
"package_description": {
"type": "string",
"maxLength": 1000
},
"client_reference": {
"description": "Your own order reference (unique).",
"type": "string"
},
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
},
"end_customer_time_window_start": {
"description": "ISO 8601 start of the delivery window promised to the end customer.",
"type": "string"
},
"end_customer_time_window_end": {
"description": "ISO 8601 end of the delivery window.",
"type": "string"
}
},
"required": [
"address",
"package_type"
]
},
"description": "1 to 8 dropoff points."
},
"pickup_at": {
"description": "ISO 8601 time the courier should arrive at the pickup. Omit to dispatch immediately.",
"type": "string"
}
},
"required": [
"pickup",
"dropoffs"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_validate_job(pickup, dropoffs, pickup_at)
Check that a job would be accepted (addresses geocode inside a covered zone, fields valid) without creating it. Returns {valid}. Stuart: POST /v2/jobs/validate.
Eingabe-Schema
{
"type": "object",
"properties": {
"pickup": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"comment": {
"description": "Note for the courier (floor, door code location, ...).",
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
}
},
"required": [
"address"
],
"description": "The single pickup point."
},
"dropoffs": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"package_type": {
"type": "string",
"enum": [
"xsmall",
"small",
"medium",
"large",
"xlarge"
],
"description": "Package size."
},
"package_description": {
"type": "string",
"maxLength": 1000
},
"client_reference": {
"description": "Your own order reference (unique).",
"type": "string"
},
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
},
"end_customer_time_window_start": {
"description": "ISO 8601 start of the delivery window promised to the end customer.",
"type": "string"
},
"end_customer_time_window_end": {
"description": "ISO 8601 end of the delivery window.",
"type": "string"
}
},
"required": [
"address",
"package_type"
]
},
"description": "1 to 8 dropoff points."
},
"pickup_at": {
"description": "ISO 8601 time the courier should arrive at the pickup. Omit to dispatch immediately.",
"type": "string"
}
},
"required": [
"pickup",
"dropoffs"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_estimate_pickup_eta(pickup, dropoffs, pickup_at)
Estimated seconds until a courier could arrive at the pickup address, for the same job body as create. Nothing is booked. Stuart: POST /v2/jobs/eta.
Eingabe-Schema
{
"type": "object",
"properties": {
"pickup": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"comment": {
"description": "Note for the courier (floor, door code location, ...).",
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
}
},
"required": [
"address"
],
"description": "The single pickup point."
},
"dropoffs": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"package_type": {
"type": "string",
"enum": [
"xsmall",
"small",
"medium",
"large",
"xlarge"
],
"description": "Package size."
},
"package_description": {
"type": "string",
"maxLength": 1000
},
"client_reference": {
"description": "Your own order reference (unique).",
"type": "string"
},
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
},
"end_customer_time_window_start": {
"description": "ISO 8601 start of the delivery window promised to the end customer.",
"type": "string"
},
"end_customer_time_window_end": {
"description": "ISO 8601 end of the delivery window.",
"type": "string"
}
},
"required": [
"address",
"package_type"
]
},
"description": "1 to 8 dropoff points."
},
"pickup_at": {
"description": "ISO 8601 time the courier should arrive at the pickup. Omit to dispatch immediately.",
"type": "string"
}
},
"required": [
"pickup",
"dropoffs"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_estimate_dropoff_eta(pickup, dropoffs, pickup_at)
Estimated seconds to reach the destination address for a job (coordinates need the text address too). Nothing is booked. Stuart: POST /v2/jobs/cpt.
Eingabe-Schema
{
"type": "object",
"properties": {
"pickup": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"comment": {
"description": "Note for the courier (floor, door code location, ...).",
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
}
},
"required": [
"address"
],
"description": "The single pickup point."
},
"dropoffs": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"package_type": {
"type": "string",
"enum": [
"xsmall",
"small",
"medium",
"large",
"xlarge"
],
"description": "Package size."
},
"package_description": {
"type": "string",
"maxLength": 1000
},
"client_reference": {
"description": "Your own order reference (unique).",
"type": "string"
},
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
},
"end_customer_time_window_start": {
"description": "ISO 8601 start of the delivery window promised to the end customer.",
"type": "string"
},
"end_customer_time_window_end": {
"description": "ISO 8601 end of the delivery window.",
"type": "string"
}
},
"required": [
"address",
"package_type"
]
},
"description": "1 to 8 dropoff points."
},
"pickup_at": {
"description": "ISO 8601 time the courier should arrive at the pickup. Omit to dispatch immediately.",
"type": "string"
}
},
"required": [
"pickup",
"dropoffs"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_validate_address(type, address, phone, coordinates)
Check that an address can be geocoded and lies inside a Stuart zone, as a pickup (picking) or a dropoff (delivering). A phone number is needed when the address is approximate. Stuart: POST /v2/addresses/validate.
Eingabe-Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"picking",
"delivering"
],
"description": "picking = pickup address, delivering = dropoff address."
},
"address": {
"type": "string",
"minLength": 1,
"description": "Full-text address."
},
"phone": {
"description": "Contact phone (E.164); required when the address is not precise.",
"type": "string"
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
}
},
"required": [
"type",
"address"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_get_zone_coverage(zone, type)
GeoJSON of the picking or delivery area of an open Stuart zone (for example paris, london). Stuart: GET /v2/areas/{zone}.
Eingabe-Schema
{
"type": "object",
"properties": {
"zone": {
"type": "string",
"minLength": 1,
"description": "Zone name, e.g. paris, london."
},
"type": {
"type": "string",
"enum": [
"picking",
"delivering"
],
"description": "Which area: pickup or dropoff."
}
},
"required": [
"zone",
"type"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_get_zone_schedule_slots(zone, type, date)
Available time slots (start and end, 15-minute steps) in a zone for a date, from the time of the request onward. Use a future date. Stuart: GET /v2/jobs/schedules/{zone}/{type}/{date}.
Eingabe-Schema
{
"type": "object",
"properties": {
"zone": {
"type": "string",
"minLength": 1,
"description": "Zone name, e.g. paris, london."
},
"type": {
"type": "string",
"minLength": 1,
"description": "Slot type, e.g. pickup."
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date, YYYY-MM-DD."
}
},
"required": [
"zone",
"type",
"date"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢stuart_get_courier_phone(delivery_id)
Anonymised phone number of the courier assigned to a delivery. Only works once a courier is assigned; expires when the delivery ends. Stuart: GET /v2/deliveries/{deliveryId}/phone_number.
Eingabe-Schema
{
"type": "object",
"properties": {
"delivery_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart delivery id (the id inside a job's deliveries, not the job id)."
}
},
"required": [
"delivery_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡stuart_create_job(pickup, dropoffs, pickup_at, assignment_code)
BOOKS A REAL, CHARGED DELIVERY: creates a job with one pickup and 1-8 dropoffs and starts looking for a courier right away (unless pickup_at schedules it: up to 4 days ahead, 30 for corporate accounts). Get a quote with stuart_estimate_price and check with stuart_validate_job first, and confirm with the user. Use the sandbox environment for tests. Stuart: POST /v2/jobs.
Eingabe-Schema
{
"type": "object",
"properties": {
"pickup": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"comment": {
"description": "Note for the courier (floor, door code location, ...).",
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
}
},
"required": [
"address"
],
"description": "The single pickup point."
},
"dropoffs": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1,
"description": "Street address only. Floor, door and building details go in comment."
},
"package_type": {
"type": "string",
"enum": [
"xsmall",
"small",
"medium",
"large",
"xlarge"
],
"description": "Package size."
},
"package_description": {
"type": "string",
"maxLength": 1000
},
"client_reference": {
"description": "Your own order reference (unique).",
"type": "string"
},
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"description": "Either firstname + lastname, or company, is required by Stuart.",
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"description": "E.164, e.g. +442079476330. Required if the address is not precise.",
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": "string"
}
}
},
"coordinates": {
"description": "Optional coordinates (up to 6 decimals). An address string is still required.",
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"long": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"long"
]
},
"end_customer_time_window_start": {
"description": "ISO 8601 start of the delivery window promised to the end customer.",
"type": "string"
},
"end_customer_time_window_end": {
"description": "ISO 8601 end of the delivery window.",
"type": "string"
}
},
"required": [
"address",
"package_type"
]
},
"description": "1 to 8 dropoff points."
},
"pickup_at": {
"description": "ISO 8601 time the courier should arrive at the pickup. Omit to dispatch immediately.",
"type": "string"
},
"assignment_code": {
"description": "Invoicing reference shown on invoices.",
"type": "string"
}
},
"required": [
"pickup",
"dropoffs"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴stuart_update_job(job_id, delivery_id, client_reference, package_description, pickup, ...)
Change allowed details of a delivery in a job: client_reference, package_description, and the pickup/dropoff comment and contact (what is editable depends on the delivery status: once delivered only client_reference). Stuart: PATCH /v2/jobs/{jobId}.
Eingabe-Schema
{
"type": "object",
"properties": {
"job_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart job id."
},
"delivery_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Delivery id inside the job."
},
"client_reference": {
"type": "string"
},
"package_description": {
"type": "string",
"maxLength": 1000
},
"pickup": {
"type": "object",
"properties": {
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"company_name": {
"type": "string"
}
}
}
}
},
"dropoff": {
"type": "object",
"properties": {
"comment": {
"type": "string",
"maxLength": 1000
},
"contact": {
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"company_name": {
"type": "string"
}
}
}
}
}
},
"required": [
"job_id",
"delivery_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴stuart_cancel_job(job_id, public_reason_key, comment)
Cancels a whole job and all its deliveries. Stuart may charge a cancellation fee once a courier is on the way; confirm with the user first. Give a reason key for reporting. Stuart: POST /v2/jobs/{jobId}/cancel.
Eingabe-Schema
{
"type": "object",
"properties": {
"job_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart job id."
},
"public_reason_key": {
"description": "Reason for the cancellation.",
"type": "string",
"enum": [
"address_error",
"courier_issue",
"customer_cancellation_requested",
"duplicate_package",
"incorrect_package",
"no_supply",
"other",
"package_damaged",
"package_not_ready",
"pu_closed",
"technical_issue",
"wrong_package_size"
]
},
"comment": {
"description": "Details.",
"type": "string",
"maxLength": 1000
}
},
"required": [
"job_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴stuart_cancel_delivery(delivery_id, public_reason_key, comment)
Cancels a single delivery (one dropoff) of a multi-drop job. A cancellation fee may apply; confirm with the user first. Stuart: POST /v2/deliveries/{deliveryId}/cancel.
Eingabe-Schema
{
"type": "object",
"properties": {
"delivery_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart delivery id."
},
"public_reason_key": {
"description": "Reason for the cancellation.",
"type": "string",
"enum": [
"address_error",
"courier_issue",
"customer_cancellation_requested",
"duplicate_package",
"incorrect_package",
"no_supply",
"other",
"package_damaged",
"package_not_ready",
"pu_closed",
"technical_issue",
"wrong_package_size"
]
},
"comment": {
"description": "Details.",
"type": "string",
"maxLength": 1000
}
},
"required": [
"delivery_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡stuart_mark_order_ready(job_id, delivery_id, order_ready_at)
Tell Stuart the order is packed and ready for the courier to collect. Pass exactly one of job_id (all orders of the job) or delivery_id (one order). Send it only when the order is really ready. Stuart: POST /v2/jobs/{jobId}/order_ready or /v2/deliveries/{deliveryId}/order_ready.
Eingabe-Schema
{
"type": "object",
"properties": {
"job_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart job id (all orders under the job)."
},
"delivery_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1
}
],
"description": "Stuart delivery id (one order)."
},
"order_ready_at": {
"description": "ISO 8601 time it became ready; default = now (server time).",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Community
Nachweis