/products/<product.id>/prices
Retrieves pricing for the requested product. All available service levels are returned, though usually only one will be present.
selling = price that a workgroup sells at.
transfer = price that a workgroup buys at.
production = cost that a workgroup incurs from third party suppliers (Marketplace, or workgroup suppliers).
GET http://dev.flyerlink.com/api.php/products/MBG3L5T?/prices?format=json
{
"services" : [{
"adddays" : "2",
"batches" : [{
"selling" : 64,
"transfer" : <float>,
"production" : 0,
"_attrs" : {
"batch" : 1
}
}
... <other 'batch' items> ...
}, {
"selling" : 164,
"transfer" : <float>,
"production" : 0,
"_attrs" : {
"batch" : 10
}
}, {
"selling" : 7,
"transfer" : <float>,
"production" : 0,
"_attrs" : {
"batch" : "runon"
}
}
]
}
]
}
/products/<product.id>/prices/
Sets pricing for the requested product.
Important: Each price has three aspects, and all possible combinations of [turnaround], [batches], [transaction type] for the product must be set in one request. The pricing for a product is wiped immediately before your new data is entered, so any omitted combinations will be erased.
Be sure to include data for your product’s ‘base turnaround’ where turnaround = product.days. This is the only turnaround that you must specify; pricing for other turnaround values (within your allowed range) is optional.
The format of each entry is:
prices[turnaround][batches][type]=value.
All three must be included in a request.
Below is the simplest example, for a turnaround of 2 production days, and only 1 batch. Note: we've put line-feeds before each & for legibility.
POST http://dev.flyerlink.com/api.php/products/MBG3L5T/prices territory=TEMP &prices[2][1][selling]=50 &prices[2][1][transfer]=40 &prices[2][1][production]=0 &format=json
Jump to contents page of
|
|||