lookupBuyPriceFromMap
WRITEMap-aware wrapper: look up itemId in a SupplierPriceMap, then resolve via lookupPriceFromBreaks.
POST /api/v1/shared/lookupBuyPriceFromMap
curl -X POST '<your-host>/api/v1/shared/lookupBuyPriceFromMap' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"itemId": "string",
"requestedQty": 0,
"priceMap": {},
"fallbackCost": 0
}'Response
0Parameters
ParameterType
Input schema
schema
{
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"requestedQty": {
"type": "number"
},
"priceMap": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"priceBreaks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"quantity": {
"type": "number"
},
"unitPrice": {
"type": "number"
}
},
"required": [
"quantity",
"unitPrice"
]
}
},
"fallbackUnitPrice": {
"type": [
"number",
"null"
]
}
},
"required": [
"priceBreaks",
"fallbackUnitPrice"
]
}
},
"fallbackCost": {
"type": "number"
}
},
"required": [
"itemId",
"requestedQty",
"priceMap",
"fallbackCost"
]
}