I faced this issue from last week and found solution finally after a discussion with FedEx Technical Person.See why we are facing such error all because of Developer Test Account we generated from developer website.One thing we should keep in mind that Test Account Number start with "6" is of Production & Key Start with "5" is Correct Test Key.So Please check your Test Key when you get Authentication problem with Error Code 1000.

Revert me if this is not helpful.

Answer from Amarn on Stack Overflow
🌐
Reddit
reddit.com › r/fedex › fedex api: unexplained 400 errors that make no sense
r/FedEx on Reddit: Fedex API: unexplained 400 errors that make no sense
February 22, 2025 -

Hi all,

I am currently using the Fedex API to integrate their services into our software. Their entire testing environment has been virtualized, so you get basically no usefull testing capabilities. I am able to upload documents using their "Trade Documents Upload API", which works just fine, but when trying to connect these documents to the shipment I am suddenly getting a 400 error: "SHIPMENT.ACCOUNTNUMBER.UNAUTHORIZED", with a message saying they cannot retrieve the error message. The only difference between a passing request and a failing request here is the inclusion of "shipmentSpecialServices", doing it exactly like they tell you to do it in the upload document docs.

This is using a pre-shipment document upload setup

Does anyone have any experience with this?

🌐
FedEx
developer.fedex.com › api › en-us › guides › best-practices.html
Best Practices | FedEx Developer Portal
Note: The API response can contain notes and warnings that provide informative content. Please be sure to log and parse the messages. 400 Bad request We received a bad request that we are unable to process. Please modify your request and try again. Note: Please review the error code and message ...
Discussions

java - FEDEX API, Authentication Failed - Stack Overflow
I am integrating FEDEX Tracking, Rate and Shipping API's into my application but i am stuck with an issue. When i run my code with Developer account details, everything runs correctly. But when i run the same code with production keys, it gives me "Error Code 1000, Authentication Error" More on stackoverflow.com
🌐 stackoverflow.com
FedEx API Request Failing with 422 Error - Invalid Field Value
Welcome to the community! Please ensure that you are following the subreddit's posting rules. If you have any questions, feel free to contact the moderators. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/FedEx
2
3
July 4, 2024
php - Fedex API giving error value for rates - Stack Overflow
why I'm getting this response from FedEx API? when searched everywhere I'm getting response like you wrongly entered your shipper number but i entered it right. I got the response in $response = $ More on stackoverflow.com
🌐 stackoverflow.com
php - FEDEX Shipping Rate API Error Msg: 'Account number not found.' - Stack Overflow
Has anyone encountered this error message recently while using FEDEX's shipping rate API?? I've been working with the FEDEX shipping rate API for ~a week now, and my code (run [this][1] which requ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
FedEx
crossborder.fedex.com › us › ecommerce › api › error_list.shtml
FedEx® International Connect | FedEx
Find a better shipment method for delivering your international packages with FedEx International Connect.
🌐
FedEx
fedex.com › us › solutions › wis › pdf › fedexapierrors.pdf
FedEx | System Down
July 23, 2020 - We're sorry, we can't process your request right now. It appears you don't have permission to view this webpage · Thank you for choosing FedEx
🌐
FedEx
developer.fedex.com › api › en-co › catalog › service-availability › docs.html
Service Availability API Documentation | FedEx Developer Portal
The result of this request is a list of all FedEx services, service options and the package options available with the input provided. The request would fail if address details are not valid for example City, State/Province and ZIP/Postal code combination is not valid.
🌐
ShippyPro
help.shippypro.com › en › knowledge › articles › 6039770-how-to-fix-fedex-errors
How to fix FedEx errors
The FedEx error indicates that it is too late to make changes online. Since the system cannot process updates or cancellations for requests related to previous days, you must contact FedEx customer service to cancel or reschedule your shipment. If you are shipping documents only, you will need to declare the field "CustomInfoContentsType": "documents" in your API call.
Find elsewhere
🌐
FedEx
developer.fedex.com › api › en-us › catalog › ship › docs.html
Ship API Documentation | FedEx Developer Portal
ZIP codes by 8, 8:30, 9 or 9:30 a.m. to most areas. [Service ENUM : INTERNATIONAL_FIRST] ... FedEx provides package delivery typically in 1, 2 or 3 business days to more than 220 countries and territories. Provides fastest deliveries to major cities in Canada and Mexico typically in 1 business day and major cities in Europe and Asia by noon typically in 2 business days.
🌐
Reddit
reddit.com › r/fedex › fedex api request failing with 422 error - invalid field value
r/FedEx on Reddit: FedEx API Request Failing with 422 Error - Invalid Field Value
July 4, 2024 -

Hi all,

I'm working on integrating the FedEx API to fetch shipping rates but encountering persistent 422 errors. The error message states "Invalid field value in the input," but I'm struggling to identify which field is causing the issue.

Whenever I send a request to the FedEx API, I receive a 422 error response with the message "Invalid field value in the input." Below are the details of my request payload and the server response.

Request Payload

{
  "accountNumber": {
    "value": "123456789"
  },
  "requestedShipment": {
    "shipDateStamp": "2024-07-04",
    "pickupType": "USE_SCHEDULED_PICKUP",
    "serviceType": "FEDEX_ECONOMY_SELECT",
    "packagingType": "YOUR_PACKAGING",
    "totalWeight": {
      "units": "KG",
      "value": 11
    },
    "shipper": {
      "address": {
        "streetLines": ["123 Origin St"],
        "city": "Deeide",
        "postalCode": "CH5 2UA",
        "countryCode": "GB"
      }
    },
    "recipient": {
      "address": {
        "streetLines": ["456 Destination Ave"],
        "city": "Reading",
        "postalCode": "RG2 9YE",
        "countryCode": "GB"
      }
    },
    "rateRequestType": ["ACCOUNT"],
    "requestedPackageLineItems": [
      {
        "groupPackageCount": "1",
        "weight": {
          "units": "KG",
          "value": 1
        },
        "dimensions": {
          "length": 10,
          "width": 10,
          "height": 10,
          "units": "CM"
        }
      },
      {
        "groupPackageCount": "1",
        "weight": {
          "units": "KG",
          "value": 10
        },
        "dimensions": {
          "length": 10,
          "width": 10",
          "height": 10,
          "units": "CM"
        }
      }
    ]
  },
  "rateRequestControlParameters": {
    "returnTransitTimes": true
  }
}

Error Response

{
  "transactionId": "31504e25-a8d5-458d-a624-262cb7e06706",
  "errors": [
    {
      "code": "INVALID.INPUT.EXCEPTION",
      "message": "Invalid field value in the input"
    }
  ]
}

Code

Here is the JavaScript code I'm using to send the request:

const fetch = require('node-fetch');

const FEDEX_API_URL = 'https://apis.fedex.com/rate/v1/rates/quotes';
const FEDEX_ACCOUNT_NUMBER = '123456789';

async function getFedexRates(token, serviceType, shipmentDetails) {
  const currentDate = new Date().toISOString().split('T')[0];

  const packages = shipmentDetails.packages.map((pkg) => ({
    groupPackageCount: '1',
    weight: {
      units: 'KG',
      value: pkg.weight
    },
    dimensions: {
      length: pkg.length,
      width: pkg.width,
      height: pkg.height,
      units: 'CM'
    }
  }));

  const fedexRequest = {
    accountNumber: {
      value: FEDEX_ACCOUNT_NUMBER
    },
    requestedShipment: {
      shipDateStamp: currentDate,
      pickupType: 'USE_SCHEDULED_PICKUP',
      serviceType: serviceType,
      packagingType: 'YOUR_PACKAGING',
      totalWeight: {
        units: 'KG',
        value: shipmentDetails.packages.reduce((acc, pkg) => acc + pkg.weight, 0)
      },
      shipper: {
        address: {
          streetLines: [shipmentDetails.originAddress],
          city: shipmentDetails.originCity,
          postalCode: shipmentDetails.originPostcode,
          countryCode: shipmentDetails.originCountry
        }
      },
      recipient: {
        address: {
          streetLines: [shipmentDetails.destinationAddress],
          city: shipmentDetails.destinationCity,
          postalCode: shipmentDetails.destinationPostcode,
          countryCode: shipmentDetails.destinationCountry
        }
      },
      rateRequestType: ['ACCOUNT'],
      requestedPackageLineItems: packages
    },
    rateRequestControlParameters: {
      returnTransitTimes: true
    }
  };

  console.log('FedEx Request:', JSON.stringify(fedexRequest, null, 2));

  try {
    const response = await fetch(FEDEX_API_URL, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-locale': 'en_US',
        'Authorization': `Bearer ${token}`
      },
      body: JSON.stringify(fedexRequest)
    });

    const responseBody = await response.text();
    console.log('FedEx Response Status:', response.status);
    console.log('FedEx Response Body:', responseBody);

    if (!response.ok) {
      throw new Error(`FedEx API request failed with status ${response.status}: ${responseBody}`);
    }

    const fedexData = JSON.parse(responseBody);
    return fedexData;
  } catch (error) {
    console.error(`Error fetching data for service type ${serviceType}:`, error.message);
    return null;
  }
}

module.exports = { getFedexRates };
  • What could be causing the 422 error with the message "Invalid field value in the input"?

  • Are there any specific fields or values that need to be adjusted for this request to succeed?

Any help or guidance on this issue would be greatly appreciated!

🌐
FedEx
fedex.com › us › developer › downloads › pdfs › 2021 › FedEx_WebServices_DevelopersGuide_v2021.pdf pdf
FedEx Web Services, Developer Guide 2021 1 Developer Guide
Appendix O: Error Code Messages ....................................................................................................................
🌐
FedEx
developer.fedex.com › api › en-cm › catalog › postal-code › docs.html
Postal Code Validation API Documentation | FedEx Developer Portal
If validation error occurs for a country that does not use ZIP codes, try to force the address through by entering \"00000\" as a replacement postal code. Using this false postal code should not cause issues, as it does not exist. The following are the benefits of using FedEx Postal Code Validation API...
🌐
User Manual
usermanual.wiki › Document › PropDevGuide.1258851854 › help
Tmp_Wf6MDz Prop Dev Guide
487 FedEx SmartPost Shipping Error Messages .............................................. 526 SPOD Error Messages ................................................................................
🌐
FedEx
fedex.com › us › developer › downloads › pdfs › 2021 › FedEx_WebServices_RateServices_WSDLGuide_v2021.pdf pdf
Rate Service Guide FedEx Web Services 2021
were any errors. Examine the HTTP header to determine if any HTTP or Web Server errors · were encountered. If you received a 200 status code, parse the reply to determine if there
🌐
FedEx
fedex.com › us › developer › downloads › pdf › 2024 › FedEx_Ship_Manager_Server_20.08_Transaction_and_Coding_Reference_Guide.pdf pdf
Transaction and Coding Reference Guide
24.3 Error codes 0100-0199 ..................................................................................................................................