question

tgc_automotive avatar image
0 Likes"
tgc_automotive asked

Problem with createInventoryLocation

Hi,

I'm trying to create an Inventory Location via the sell api and hitting a brick wall!!

I'm using Postman and sending a POST request to: https://api.ebay.com/sell/inventory/v1/location/STRAT to create a Location named STRAT

Here is my payload:

{
    "location": {
        "address": {
            "addressLine1": "Unit 14 Drayton Manor Drive",
            "addressLine2": "Alcester Road",
            "city": "Stratford-upon-Avon",
            "country": "GB",
            "county": "Warwickshire",
            "postalCode":"CV37 9RQ"
        },
        "geoCoordinates": {
            "latitude": "52.194169",
            "longitude": "-1.772571"
        }
    },
    "locationInstructions": "Items ship from here.",
    "locationWebUrl": "https://4x4tyres.co.uk",
    "merchantLocationStatus": "ENABLED",
    "name": "STRAT",
    "operatingHours" : [
        {
            "dayOfWeek" : "MONDAY",
            "intervals" : [
                {
                    "close" : "08:30:00",
                    "open" : "17:30:00"
                }
            ]
        }
    ],
    "phone": "+44(0)1789 774746"
}

But this is failing with an error of:

{
    "errors": [
        {
            "errorId": 25802,
            "domain": "API_INVENTORY",
            "category": "REQUEST",
            "message": "errorDetails(20400/Invalid request.)"
        }
    ]
}

My token has the correct scope of

https://api.ebay.com/oauth/api_scope/sell.inventory

Unfortunately that error isn't very helpful really! I did have an issue whereby I followed the documentation and used daysOfWeekEnum instead of daysOfWeek but I sorted that after reading this forum post - https://forums.developer.ebay.com/questions/21813/day-of-week-issue.html

Any help here would be great.

Thanks

Kevin


selling apipostman
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

henad89 avatar image
0 Likes"
henad89 answered

Hello,

I'm not sure if this is still a problem, but i had a similar occurrence. My issue was the interval in my weekdays were swapped ( i had my open time after my close time ). It looks like you have the same problem. I guess Ebay's API checks to make sure your open time is not after your close time, which would be nice to see in the error response rather than "errorDetails(20400/Invalid request.)".

Anyways, if anyone else had the same problem I hope this comment helps.

Cheers,

Hicham

10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mypmed_0 avatar image
0 Likes"
mypmed_0 answered

Myaarpmedicare.com AARP offers MyAARP Rewards program (also known as AARP Rewards for Good) which are offered to their customers for making use of the services and tools offered by AARP.org.

10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.