Set product location prices
POST
/merchants/{merchantCode}/productLocationPrices
const url = 'https://catalog.shopgate.io/v1/merchants/example/productLocationPrices';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"productLocationPrices":[{"productCode":"someCode","locationCode":"someCode","properties":"example","externalUpdateDate":"2018-12-15T00:00:23.114Z","cost":2.55,"price":3.5,"unit":"kg","salePrice":3,"msrp":4.5,"minPrice":3,"maxPrice":7.5,"volumePricing":[{"minQty":1,"maxQty":2,"price":6.4,"salePrice":5,"unit":"kg","priceType":"fixed"}],"mapPricing":[{"startDate":"2018-12-12T14:27:23.114Z","endDate":"2018-12-15T00:00:23.114Z","price":10.1}],"currencyCode":"AED"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://catalog.shopgate.io/v1/merchants/example/productLocationPrices \ --header 'Content-Type: application/json' \ --data '{ "productLocationPrices": [ { "productCode": "someCode", "locationCode": "someCode", "properties": "example", "externalUpdateDate": "2018-12-15T00:00:23.114Z", "cost": 2.55, "price": 3.5, "unit": "kg", "salePrice": 3, "msrp": 4.5, "minPrice": 3, "maxPrice": 7.5, "volumePricing": [ { "minQty": 1, "maxQty": 2, "price": 6.4, "salePrice": 5, "unit": "kg", "priceType": "fixed" } ], "mapPricing": [ { "startDate": "2018-12-12T14:27:23.114Z", "endDate": "2018-12-15T00:00:23.114Z", "price": 10.1 } ], "currencyCode": "AED" } ] }'Set product location prices
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
Query Parameters
Section titled “Query Parameters”catalogCode
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
productLocationPrices
required
Array
object
productCode
required
Human readable code of the entity
string
Example
someCodelocationCode
required
Human readable code of the entity
string
Example
someCodeproperties
object
externalUpdateDate
null | string format: date-time
Example
2018-12-15T00:00:23.114Zcost
The actual cost for the merchant
null | number
Example
2.55price
required
Price for the shopper
number
Example
3.5unit
Unit the price applies to (pieces, kg, packs)
null | string
Example
kgsalePrice
Sale price
null | number
Example
3msrp
Manufacturer’s suggested retail price
null | number
Example
4.5minPrice
Lowest possible price (configurable product)
number
Example
3maxPrice
Highest possible price (configurable product)
number
Example
7.5volumePricing
Array<object>
object
minQty
required
null | number
Example
1maxQty
required
null | number
Example
2price
required
Price of the tier
number
Example
6.4salePrice
Sale price of the tier
null | number
Example
5unit
null | string
Example
kgpriceType
required
Fixed price, or relative to the standard price
string
Example
fixedmapPricing
Array<object>
object
startDate
null | string format: date-time
Example
2018-12-12T14:27:23.114ZendDate
null | string format: date-time
Example
2018-12-15T00:00:23.114Zprice
required
number
Example
10.1currencyCode
required
string
Example
USDResponses
Section titled “Responses”Successfully set
Media typeapplication/json
object
errors
required
Array<object>
object
code
number
entity
string
entityId
string | object
entityIndex
integer
reason
string
catalogCode
string
subentityPath
Array<string | number>
validationErrors
Array<object>
object
code
Machine readable error code
string
message
Human readable error code
string
description
string
path
Array<string>
Example
{ "errors": [ { "code": 400, "entity": "planet", "entityId": "pluto", "entityIndex": 1, "reason": "Planet pluto was not found (did you mean dwarf planet pluto?)", "subentityPath": [ "categories", 0 ], "validationErrors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } ]}Validation error
Media typeapplication/json
object
statusCode
number
message
string
code
string
additionalInfo
object
validationErrors
Array<object>
object
code
number
reason
string
entity
string
entityId
string
subentityPath
Array<string | number>
error
object
paramName
The parameter-field, that failed to validate, like “userId”
string
paramValue
The value, that was sent, like “xxx”
null | string | number | array | object
code
Machine readable error code
string
message
required
Human readable error code
string
results
object
errors
Array<object>
object
code
Machine readable error code
string
message
Human readable error code
string
description
string
path
Array<string>
warnings
array
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } }}Merchant, location or product not found
Media typeapplication/json
object
statusCode
number
code
required
string
message
required
string
Example
{ "code": "NotFound", "message": "Merchant not found"}
