skip to Main Content

After a day of work with Postman, I have managed to reduce the number of errors down to 1. No idea how to get past it.

Definitely not an authorisation problem. I’ve been making lots of authorised calls.

URI:

POST https://api.ebay.com/sell/account/v1/fulfillment_policy

Body:

{
  "categoryTypes": [
    {
      "name": "ALL_EXCLUDING_MOTORS_VEHICLES"
    }
  ],
  "freightShipping": "false",
  "globalShipping": "false",
  "handlingTime": {
    "unit": "DAY",
    "value": "1"
  },
  "localPickup": "true",
  "marketplaceId": "EBAY_AU",
  "name": "100 grams",
  "shippingOptions": [
    {
      "costType": "CALCULATED",
      "optionType": "DOMESTIC",
      "shippingServices": [
        {
          "shippingCarrierCode": "Australia Post",
          "shippingServiceCode": "AU_Regular"
        }
      ]
    }
  ]
}

Output:

{
    "errors": [
        {
            "errorId": 20403,
            "domain": "API_ACCOUNT",
            "category": "REQUEST",
            "message": "Invalid .",
            "longMessage": "Please select a valid postage service.",
            "inputRefIds": [
                "service"
            ],
            "parameters": [
                {
                    "name": "XPATH",
                    "value": "DomesticItemShippingService[0].shippingService"
                }
            ]
        }
    ]
}

Things I’ve Tried:

  • Deleting "shippingOptions": [...] (and everything inside the []s) got rid of the errors and resulted in the successful creation of a new fulfillment policy. However, I wanted to include shipping options in my call.
  • shippingCarrierCode doesn’t seem to do anything. I’ve changed it to all sorts of sensible and non sensible things, including deleting it entirely. No impact on the output.
  • Changing shippingServiceCode to anything non-standard (eg "shippingServiceCode": "potato") results in getting the exact same error, but twice instead of once. (See below) How can I get the same error twice with only one shipping option?
  • Including a domestic and international option, I get the same error twice also. (Same output as below, except the second DomesticItemShippingService[1].shippingService is instead DomesticItemShippingService[0].shippingService)
  • Making an international option AND a domestic option, BOTH with silly service names results in 3 errors. (I was expecting 4.)

Code:

{
    "errors": [
        {
            "errorId": 20403,
            "domain": "API_ACCOUNT",
            "category": "REQUEST",
            "message": "Invalid .",
            "longMessage": "Please select a valid postage service.",
            "inputRefIds": [
                "service"
            ],
            "parameters": [
                {
                    "name": "XPATH",
                    "value": "DomesticItemShippingService[0].shippingService"
                }
            ]
        },
        {
            "errorId": 20403,
            "domain": "API_ACCOUNT",
            "category": "REQUEST",
            "message": "Invalid .",
            "longMessage": "Please select a valid postage service.",
            "inputRefIds": [
                "service"
            ],
            "parameters": [
                {
                    "name": "XPATH",
                    "value": "DomesticItemShippingService[1].shippingService"
                }
            ]
        }
    ]
}

What did I do wrong this time?

2

Answers


  1. Chosen as BEST ANSWER

    I did get an answer to my question. Not here, even though I sent them the link here, but I got the answer (eventually) through official eBay channels.

    I'll post that answer here for everyone. I was thinking of adding correct stackoverflow formatting, but decided it would be better to leave the correct answer untouched from the original.

    Hello Jonathon ,

    Ignore my last message and Apologize for the confusion.

    Here is the reason why you are getting the error:

    You have to set "localPickup": "false", refer doc for your help: https://developer.ebay.com/api-docs/sell/account/resources/fulfillment_policy/methods/createFulfillmentPolicy#request.localPickup

    And you will get response as:

    { "name": "100 grams", "marketplaceId": "EBAY_AU",
    "categoryTypes": [ { "name": "ALL_EXCLUDING_MOTORS_VEHICLES", "default": true } ], "handlingTime": { "value": 1, "unit": "DAY" }, "shippingOptions": [ { "optionType": "DOMESTIC", "costType": "CALCULATED", "shippingServices": [ { "sortOrder": 1, "shippingCarrierCode": "Australia Post", "shippingServiceCode": "AU_Regular", "freeShipping": false, "buyerResponsibleForShipping": false, "buyerResponsibleForPickup": false } ], "insuranceOffered": false, "insuranceFee": { "value": "0.0", "currency": "AUD" } } ], "globalShipping": false, "pickupDropOff": false, "freightShipping": false, "fulfillmentPolicyId": "6104871000",
    "warnings": [] }

    Let us know if you need further assistance!!!

    Best Regards, eBay Developer Support


  2. Check them out here. Make sure you have all the required fields.

    pickupDropOff
    shippingOptions.shippingServices.shipToLocations.regionIncluded
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search