API v2.4 / Inventory / Refund bundle from inventory
POST /inventory/refund
Refunds an item in the inventory to the organisations balance. Takes a usageId and a quantity. The usageId’s can be found by querying the /inventory endpoint The quantity of a refund cannot exceed the remaining quantity left for the specific usageId. If you wish to refund multiple usageId’s, multiple calls to this endpoint will need to be done. If a bundle assignment has not been started and no data has been consumed, the bundle can be refunded as a credit back to the organisations balance. If the bundle assignment has started, or was purchased outside of their permitted refund period, typically 60 days, it cannot be refunded.
Request Body
object
{ "usageId": 123456, "quantity": 1}
Responses
200
OK
object
Status message of api request
Example
{ "status": "Successfully refunded bundles to balance"}
400
Bad Request - returned when request format is not accepted
object
Status of api functions which do not return data
403
Unauthorised - returned when the api token is invalid; the user does not have any available Bundles left or the ICCID is not accessible by the user
object
Status of api functions which do not return data
429
Too Many Requests
object
Status of api functions which do not return data
500
Server Error
object
Status of api functions which do not return data
503
Processing - Please come back later or use the Retry-After (seconds) header
object
Status of api functions which do not return data