Inventory Api, cannot create location.
I'm trying to post a new location for Warehouse on this url:
for example: www111www222 as merchantLocationKey
https://api.sandbox.ebay.com/sell/inventory/v1/location/{merchantLocationKey}
I'm payload the following data:
$data = [
"location" => [
"address" => [
"country" => 'PL',
"postalCode" => 'xx-xxx'
],
"locationTypes" => ["WAREHOUSE"]
]
];
I'm getting this error:
{
"errors": [
{
"errorId": 2004,
"domain": "ACCESS",
"category": "REQUEST",
"message": "Invalid request",
"longMessage": "The request has errors. For help, see the documentation for this API.",
"parameters": [
{
"name": "reason",
"value": "Could not serialize field [location.locationTypes]"
}
]
}
]
}
But I'm looking into documentation and this value should be proper.
| locationTypes | array of StoreTypeEnum | This container is used to define the function of the inventory location. Typically, an inventory location will serve as a store, warehouse, or fulfillment center, but in some cases, an inventory location may be more than one type. Occurrence: Conditional
|
Someone could help?