bullseye-arrowQuickstart

The base URL for the Marvelly REST API is: https://api.marvelly.com.ng/v1arrow-up-right

Configure Base URL

Depending on your environment and application, you will set the base URL differently. Below is a universal string that you can use to access our API. Copy it or return here later when you are ready with your environment or app.

Copy

https://api.marvelly.com.ng/v1

The REST API does not support both versioned URLs in your API requests. You can use only one of the following formats:

Using the main URLs can help ensure compatibility with future updates and changes to the API. It is recommended to use the base URLs for long-term projects to maintain stability.

Making Your First API Call

Based on your environment, you will call our API differently. Below are two common ways to call our API using two popular programming languages: PHP, Python and NodeJS.

Notes

  • Some GET request examples displayed throughout these docs are written for use with Node.js - the axiosarrow-up-right library may be required.

  • Some GET request examples displayed throughout these docs are written for use with Python - the requestarrow-up-right library may be required.

  • Some GET request examples displayed throughout these docs are written for use with PHP - the curlarrow-up-right or Guzzlearrow-up-right library may be required.

Making Your First API Call

Based on your environment, you will call our API differently. Below are three common ways to call our API using two popular programming languages: PHP, Python and NodeJS.

chevron-rightExample in Pythonhashtag

Let's start from very beginning. We assume you already installed Python (with venv), if not, here a guide for the beginnersarrow-up-right.

Create a new folder for test project, name it as aimlapi-welcome and change to it.

Copy

(Optional) If you use IDE then we recommend to open created folder as workspace. On example, in VSCode you can do it with:

Copy

Run a terminal inside created folder and create virtual envorinment with a command

Copy

Activate created virtual environment

Copy

Create new file and name it as api.py

Copy

Paste following content inside this travel.py and replace my_key with your API key you got on first steparrow-up-right

Copy

Run the application

Copy

If you done all correct, you will see following output:

Copy

chevron-rightExample in NodeJShashtag

As in the example from Python, we start from the very beginning too. We assume you already have Node.js installed. If not, here is a guide for beginnersarrow-up-right.

We need to create a new folder for the example project:

Copy

(Optional) If you use IDE then we recommend to open created folder as workspace. On example, in VSCode you can do it with:

Copy

Now create a project file:

Copy

Install the required dependencies:

Copy

Create a file with the source code:

Copy

And paste the following content:

Copy

You will see a response that looks like this:

Copy

Last updated