There are multiple ways to manage your Reloadly developer account such as the Reloadly dashboard, or by making API calls directly either via Reloadly SDKs, Postman Collection, or the API Reference. Each of these methods allows you to check your balance, rotate your access tokens, and make top-ups, order gift cards, and pay for utility bills.
In this blog post, we will focus on Reloadly’s API Reference which provides extensive information on all Reloadly’s products and API endpoints. Its interface allows you to work in production or sandbox(test) mode – simulating responses while also confirming their real time values. Nevertheless, if you’re an avid user of Reloadly or if you just signed up today, here are four tips to improve your experience while working with the API reference.
The OpenAPI specification
Reloadly’s API Reference was written with OpenAPI specification best practices. This lets you interact with the API using a minimal amount of implementation and logic. You can download the reference’s OpenAPI specification and use it on your personal machine, Postman collection, project, or Swagger implementation. The video snippet below shows how to download the specification and upload it on Postman to create a collection
The “Try It” feature
With the “Try It” feature, you can make test and live requests on the API reference. All you need to do is input the right parameters and you are good to go. The right process is to first make a request for your access token using the Create Access Token endpoint – then proceed to use your access token to make other requests to the API. The video snippet below shows how to retrieve your access token and then make a top-up in test mode using the “Try It” feature
Reference code samples
The API Reference contains code samples in ten different programming languages for every API request. This is great for developers looking to integrate Reloadly’s API into their projects – web or mobile. Working with the “Try It” feature also adds real-time updates to each code sample according to the parameter added or removed. The code snippet below shows how to make a gift card order in Ruby
require 'uri' require 'net/http' require 'openssl' url = URI("https://giftcards.reloadly.com/orders") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request["Accept"] = 'application/com.reloadly.giftcards-v1+json' request["Authorization"] = 'Bearer <YOUR_TOKEN_HERE>' request.body = "{\"productId\":10,\"countryCode\":\"US\",\"quantity\":2,\"unitPrice\":5,\"customIdentifier\":\"obucks10\",\"senderName\":\"John Doe\",\"recipientEmail\":\"anyone@email.com\",\"recipientPhoneDetails\":{\"countryCode\":\"ES\",\"phoneNumber\":\"657829900\"}}" response = http.request(request) puts response.read_body
Link to the above code snippet here
API status page
The API status page enables you to view the uptime status of every of Reloadly’s services. This is extremely helpful with tracking and measuring uptime rates and factoring the availability your end users can expect from your application/ Below is a screenshot of Reloadly’s API status page
Summary
Reloadly’s API enables integration to airtime, gift card, and bill payment services across the globe. The API reference serves as a single source of truth for each of these services thus enabling you to integrate seamlessly and improve your developer experience.
Have a question? You can always reach out to the team via our developer community. We look forward to having you!