cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Is cost available from REST?

devmandan
Beginner
Beginner

I see costs on order confirmation pages, but having trouble finding this data via REST.  The demo system I am using has $0.0 cost everywhere.  I assume it would still be available through API and returned as 0.0, but maybe I need to set actual costs to get the elements in response?

I tried pulling servicedef data by id and do not see cost.  A request for serviceoffering data returns no rows.  Please let me know what request would return the cost the user sees when ordering.

Thanks,

dan

SnapshotCost.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Mark Swanborough
Cisco Employee
Cisco Employee

Hello,

I think I have what you're looking for. For a given Requisiton Id, below I have 117, you can get the cost details from 2 places.

For the Requisition, there is the total expected cost:

URL:

/RequestCenter/nsapi/transaction/requisitions/id/117/

Response:


...
0.0
...

For the invidividual items, you'll need the many Req Entries:

URL:

/RequestCenter/nsapi/transaction/requisitionentries/RequisitionNumber=117/

Response:



...
1
... 0.00 0.00

Edit: Perhaps it's worth mentioning: services don't have prices, per se. *

This is because a service will often contain items that are "dynamic" or variable pricing. If you are writing a service with pricing, or editing an existing one, you can update the total for the service with the special conditional rule action "Set Price". This lets you set the price based on things like a selected instance size, service level, etc.

When a Service is bundled (as per the original screenshot), you can set the pricing for the individual bundled services. (Typically the sub-services that are bundled are summed, but there are also more options on how to cost correctly when services are bundled, see Service Designer -> Service -> Offer -> Bundle). As far as I am aware, this information is not available through the REST API.

* It is possible to set pricing information in the Service -> Offer -> Pricing tab, but I can't right now recall how it is used.

Message was edited by: Mark Swanborough

View solution in original post

13 REPLIES 13

otavio.augusto
Beginner
Beginner

I have the same question. I'd also like to retrieve data on the price of services.

Regards

Mark Swanborough
Cisco Employee
Cisco Employee

Hello,

I think I have what you're looking for. For a given Requisiton Id, below I have 117, you can get the cost details from 2 places.

For the Requisition, there is the total expected cost:

URL:

/RequestCenter/nsapi/transaction/requisitions/id/117/

Response:


...
0.0
...

For the invidividual items, you'll need the many Req Entries:

URL:

/RequestCenter/nsapi/transaction/requisitionentries/RequisitionNumber=117/

Response:



...
1
... 0.00 0.00

Edit: Perhaps it's worth mentioning: services don't have prices, per se. *

This is because a service will often contain items that are "dynamic" or variable pricing. If you are writing a service with pricing, or editing an existing one, you can update the total for the service with the special conditional rule action "Set Price". This lets you set the price based on things like a selected instance size, service level, etc.

When a Service is bundled (as per the original screenshot), you can set the pricing for the individual bundled services. (Typically the sub-services that are bundled are summed, but there are also more options on how to cost correctly when services are bundled, see Service Designer -> Service -> Offer -> Bundle). As far as I am aware, this information is not available through the REST API.

* It is possible to set pricing information in the Service -> Offer -> Pricing tab, but I can't right now recall how it is used.

Message was edited by: Mark Swanborough

Thanks for your reply. That'll probably help me a lot.

I'd appreciate if you could detail the following sentence you wrote in your email:

'

you can update the total for the service with the special conditional rule action "Set Price".

'

What is that "Set Price" rule action and where can it be found?

I think my problem matches the scenario you mentioned: I'd like to dynamically set the price for a service that depends on its size (the user chooses the service size from a dropdown list at the requisition form). Based on the user's choice, I'll present the price of the service right after the request submission. Makes sense?

Again, thanks for your support.