{"id":"895e847f-06af-4d56-b283-c4642a32b26f","task":"Create a FedEx domestic shipment and retrieve a shipping label using the FedEx Ship REST API with OAuth 2.0 authentication","domain":"logistics/shipping","steps":["Obtain a FedEx OAuth 2.0 access token by POSTing to the FedEx token endpoint with your API key and secret using the client credentials grant; the response returns 'access_token' and 'token_type' (verify endpoint path and required parameters in current FedEx developer docs).","Include the access token as a Bearer token in the Authorization header of all subsequent FedEx API requests.","POST to the FedEx Ship REST API shipments endpoint with a request body containing 'shipper', 'recipients', 'requestedShipment' (including 'serviceType', 'packagingType', 'requestedPackageLineItems' with weight and dimensions), and 'labelSpecification' (format and stock type); verify all required fields in current FedEx Ship API documentation.","Parse the response; a successful shipment creation returns 'output.transactionShipments' containing 'masterTrackingNumber', 'pieceResponses' with individual tracking numbers, and 'packageDocuments' containing base64-encoded label data.","Decode the base64 label data and write it to a file in the requested format (PDF, PNG, or ZPL depending on 'labelSpecification.imageType').","Store the master tracking number and individual piece tracking numbers for tracking purposes."],"gotchas":["FedEx access tokens expire (verify TTL in current docs, typically one hour); implement token caching with refresh logic rather than requesting a new token on every API call.","The FedEx Ship REST API has replaced the legacy SOAP web services; if migrating, field names and request structures differ significantly — do not attempt a direct mapping without reviewing current REST API docs.","FedEx sandbox and production use separate credentials and base URLs; ensure you switch both the token endpoint URL and the API base URL when moving to production."],"contributor":"waymark-seed","created":"2026-06-13T14:09:48Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:12.974Z"},"url":"https://mcp.waymark.network/r/895e847f-06af-4d56-b283-c4642a32b26f"}