{"openapi":"3.1.0","info":{"title":"AfterShip (BYOK) API","version":"0.1.0","description":"AfterShip (BYOK) lets an AI assistant read your own AfterShip data through the AfterShip API with a key you supply (AfterShip API key). Read-only: 5 tools (list_trackings, get_tracking, list_account_couriers, list_all_couriers, detect_courier). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to api.aftership.com....\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-aftership.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-aftership/docs"},"termsOfService":"https://connectorbay.com/byok-aftership/terms"},"servers":[{"url":"https://byok-aftership.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-aftership/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_trackings":{"post":{"operationId":"list_trackings","summary":"List parcel trackings in the AfterShip account with status tag, courier, order id and delivery date. Filter by keyword, ","description":"List parcel trackings in the AfterShip account with status tag, courier, order id and delivery date. Filter by keyword, tracking numbers, courier, tag, route, order id or created/updated time. Pages with a cursor. Only the fields listed in `fields` come back; the default leaves out customer names, emails and phone numbers. Use for \"Which of my AfterShip parcels are delivered\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"keyword":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text matched against tracking number, title, order id and similar fields.","title":"Keyword"},"tracking_numbers":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated tracking numbers to look up.","title":"Tracking Numbers"},"slug":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Courier code to filter by, for example usps (see the courier list).","title":"Slug"},"tag":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Delivery status tag to filter by, for example Delivered or InTransit.","title":"Tag"},"origin":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Origin country as ISO 3166-1 alpha-3, for example USA.","title":"Origin"},"destination":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Destination country as ISO 3166-1 alpha-3, for example GBR.","title":"Destination"},"order_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only trackings for this order id.","title":"Order Id"},"created_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only trackings created after this time (ISO 8601).","title":"Created At Min"},"created_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only trackings created before this time (ISO 8601).","title":"Created At Max"},"updated_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only trackings updated after this time (ISO 8601).","title":"Updated At Min"},"updated_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only trackings updated before this time (ISO 8601).","title":"Updated At Max"},"fields":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":"id,tracking_number,slug,tag,subtag_message,title,order_id,created_at,updated_at,shipment_delivery_date,active,on_time_status,aftership_tracking_url","description":"Comma-separated tracking fields to return. Keep it to non-personal fields; customer_name, emails and smses hold personal data.","title":"Fields"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Trackings per page (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from data.pagination.next_cursor of the previous page; leave empty for the first page.","title":"Cursor"}},"title":"list_trackingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_tracking":{"post":{"operationId":"get_tracking","summary":"Get one AfterShip tracking by id: status tag, courier, order id, delivery dates, route countries and the list of checkpo","description":"Get one AfterShip tracking by id: status tag, courier, order id, delivery dates, route countries and the list of checkpoints (time, location, message). Customer names, emails and phone numbers are not returned. Use for \"What are the checkpoints of AfterShip tracking 9c8a1b2d3e4f\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"AfterShip tracking id from the tracking list.","maxLength":100,"title":"Id","type":"string"}},"required":["id"],"title":"get_trackingArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_account_couriers":{"post":{"operationId":"list_account_couriers","summary":"List the couriers activated in the AfterShip account: courier code, name, website and required fields. Use for \"Which co","description":"List the couriers activated in the AfterShip account: courier code, name, website and required fields. Use for \"Which couriers are enabled in my AfterShip account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_account_couriersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_all_couriers":{"post":{"operationId":"list_all_couriers","summary":"List every courier AfterShip supports: courier code, name, website, required fields and countries served. Use for \"Does ","description":"List every courier AfterShip supports: courier code, name, website, required fields and countries served. Use for \"Does AfterShip support the courier Aramex\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_all_couriersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/detect_courier":{"post":{"operationId":"detect_courier","summary":"Suggest which couriers match a tracking number, based on its format. Does not create a tracking. Use for \"Which courier ","description":"Suggest which couriers match a tracking number, based on its format. Does not create a tracking. Use for \"Which courier does tracking number 9400115901047177598206 belong to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"tracking_number":{"description":"Tracking number to identify.","maxLength":100,"title":"Tracking Number","type":"string"}},"required":["tracking_number"],"title":"detect_courierArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}