Introduction

This documentation aims to provide all the information you need to work with our API.

As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile). You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_BEARER_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

This API requires two layers of authentication:

  • API Key: Sent in the "API-Key" header. You can retrieve your token by visiting your dashboard and clicking Generate API key.
  • Bearer Token: Sent in the "Authorization" header. You can get this after logging in as a user.
Note: API Key is required for all requests. Make sure to include it in the "API-Key" header for each API call.

Auth

API Endpoints for Authentication

Features:

Register

POST
https://api.powerly.app
/api/v1/auth/register

This endpoint registers a new user with the provided data. The user will receive an email verification link.

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/register" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"secret\",
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"latitude\": 37.7749,
    \"longitude\": -122.4194,
    \"country_id\": 1,
    \"vat_id\": \"123456789\",
    \"currency\": \"USD\"
}"

Login

POST
https://api.powerly.app
/api/v1/auth/login

This endpoint allows a user to log in by providing their email and password.

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/login" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"secret\"
}"

Email check

POST
https://api.powerly.app
/api/v1/auth/email/check

Checks if a user with the specified email exists in the system.

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/email/check" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
Example response:
{
    "success": 1,
    "message": "Done!",
    "data": {
        "email_exists": 1,
        "require_verification": 1
    }
}

Verify email

POST
https://api.powerly.app
/api/v1/auth/email/verify

To verify the email, you will need the email used in the registration and code received in this email,

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/email/verify" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"4023\",
    \"email\": \"[email protected]\"
}"
Example response:
{
    "data": {
        "id": 135231,
        "customer_type": "C",
        "first_name": "",
        "last_name": "",
        "full_name": "",
        "contact_number": "966977977974",
        "email": "[email protected]",
        "balance": "0.00",
        "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnYXNhYmxlLnRlc3QiLCJpYXQiOjE3MTYwMjc4ODQsImV4cCI6MTc0NzU2Mzg4NCwiZGF0YSI6eyJ1c2VyX2lkIjoxMzUyMzEsInVzZXJfdHlwZSI6MX19.NlcGZdzy4kKACb1fJSSxL-VVJIwvvTbTqtz0_Rvv3_E"
    },
    "success": 1,
    "message": "Done!"
}
{
    "data": {
        "require_verification": 1,
        "verification_token": "27ee3f39-8768-4bc3-a6ae-440d87660b02",
        "can_resend_in_seconds": 60,
        "available_attempts": 2
    },
    "success": 0,
    "message": "Incorrect verification code."
}

Resend verification code

POST
https://api.powerly.app
/api/v1/auth/resend-verification

You can resend the verification code to the user's email address.

Note that resending the code reduces the number of allowable code attempts, thereby increasing the time until the next code can be sent.

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/resend-verification" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
Example response:
{
    "success": 1,
    "message": "Please enter the verification code to continue.",
    "data": {
        "require_verification": 1,
        "verification_token": "27ee3f39-8768-4bc3-a6ae-440d87660b02",
        "can_resend_in_seconds": 60,
        "available_attempts": 3
    }
}

Logout

POST
https://api.powerly.app
/api/v1/auth/logout
requires authentication

This endpoint logs out the authenticated user by deleting their current access token.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/logout" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Password Reset

Endpoints related to password reset functionality.


Request a password reset code.

POST
https://api.powerly.app
/api/v1/auth/password/forgot

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/password/forgot" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
Example response:
{
    "success": 1,
    "message": "Please enter the verification code to continue.",
    "data": {
        "require_verification": 1,
        "verification_token": "aacc04ec-8f5f-4e99-a2d5-539f66426aa4",
        "can_resend_in_seconds": 60,
        "available_attempts": 3,
        "sent_to": ""
    }
}

Reset the user's password using the verification code.

POST
https://api.powerly.app
/api/v1/auth/password/reset

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/auth/password/reset" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": 1234,
    \"email\": \"[email protected]\",
    \"password\": \"\\\"NewSecureP@ss1\\\"\",
    \"password_confirmation\": \"\\\"NewSecureP@ss1\\\"\"
}"
Example response:
{
    "message": "Done."
}
{
  "message": "The verification code doesn't match."
{
    "message": "failed"
}

Balance

Display a listing of the available balance offers. This method retrieves balance offers either for the user's country or a specific country if `country_id` is provided.

GET
https://api.powerly.app
/api/v1/balance/offers

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

country_id
integer

int|null The ID of the country to fetch offers for. If not provided, the user's country will be used.

Example:
1

Body Parameters

Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/balance/offers?country_id=1" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"country_id\": 10
}"
Example response:
{
    "data": [
        {
            "id": 1,
            "title_en": "Premium Package",
            "title_ar": "الباقة الممتازة",
            "title_es": "Paquete Premium",
            "price": "13620.94",
            "bonus": "0.00",
            "vat": "0.00",
            "total_price": "13620.94",
            "total_balance": "13620.94",
            "popular": false,
            "active": true
        },
        {
            "id": 2,
            "title_en": "Basic Plan",
            "title_ar": "الخطة الأساسية",
            "title_es": "Plan Básico",
            "price": "2587.98",
            "bonus": "0.00",
            "vat": "0.00",
            "total_price": "2587.98",
            "total_balance": "2587.98",
            "popular": false,
            "active": true
        }
    ],
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "No available balance offers for the specified country."
}

Top up the user's balance with the selected balance offer. This method processes a top-up transaction by charging the user through the selected payment gateway and updating their balance.

POST
https://api.powerly.app
/api/v1/balance/top-up

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/balance/top-up" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"offer_id\": 1,
    \"payment_method_id\": \"\\\"pm_1234567890\\\"\"
}"
Example response:
{
    "status": "success",
    "message": "refill_balance_success",
    "data": {
        "new_balance": 1500,
        "next_action": {
            "type": "redirect",
            "url": "https://paymentgateway.com/redirect?session_id=xyz123"
        }
    }
}
{
    "status": "error",
    "message": "Payment processing failed. Please try again later."
}

Countries

GET the countries list

GET
https://api.powerly.app
/api/v1/countries

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/countries" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 9
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

Get the list of currencies.

GET
https://api.powerly.app
/api/v1/countries/currencies

This endpoint returns a list of all unique currencies available in the system. The response includes an array of currency codes.

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/countries/currencies" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
  "success": 1,
  "message": "Done!",
  "data": [
     {
 		"currency_iso": "AED"
 	},
 	{
 		"currency_iso": "AFN"
 	},
 	{
 		"currency_iso": "ALL"
 	},
 	{
 		"currency_iso": "AMD"
 	},
 	{
 		"currency_iso": "ANG"
 	},
 ...]
}
{
  "success": 0,
  "message": "The API key is invalid or missing."
}
    *

Device Management

APIs for managing user devices

Display the authenticated user's device information.

GET
https://api.powerly.app
/api/v1/device
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/device" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 9,
        "device_type": 2,
        "device_model": "android",
        "device_version": null,
        "device_language": "fr",
        "updated_at": "2025-02-13 21:56:03",
        "app_version": "2.1"
    },
    "success": 1,
    "message": "Terminé !"
}
{
    "message": "Not Found"
}

Update or create the authenticated user's device information.

PUT
PATCH
https://api.powerly.app
/api/v1/device
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
Accept-Language
Example:
string The preferred response language. Example: "fr"
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/device" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Accept-Language: string The preferred response language. Example: \"fr\"" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"device_imei\": \"\\\"123456789012345\\\"\",
    \"device_token\": \"\\\"abcdef123456\\\"\",
    \"device_type\": 1,
    \"device_model\": \"\\\"Samsung Galaxy S21\\\"\",
    \"device_version\": \"\\\"Android 12\\\"\",
    \"app_version\": \"\\\"1.2.3\\\"\",
    \"lang\": \"\\\"fr\\\"\"
}"
Example response:
{
    "data": {
        "id": 9,
        "device_type": 2,
        "device_model": "android",
        "device_version": null,
        "device_language": "fr",
        "updated_at": "2025-02-13 21:56:03",
        "app_version": "2.1"
    },
    "success": 1,
    "message": "Terminé !"
}
{
    "message": "Validation Error",
    "errors": {
        "device_imei": [
            "The device IMEI is required."
        ]
    }
}

Orders

GET the list of orders.

GET
https://api.powerly.app
/api/v1/orders
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

status
string

The status of the orders to filter by.

Must be one of:
  • active
  • complete
Example:
complete
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/orders?status=complete" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 4
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

POST start charging and create a new order.

POST
https://api.powerly.app
/api/v1/orders
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/orders" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": \"impedit\",
    \"power_source_id\": \"ipsum\"
}"

POST stop charging and close the order.

POST
https://api.powerly.app
/api/v1/orders/stop
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/orders/stop" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"power_source_id\": \"est\",
    \"order_id\": 14
}"

GET the specified order.

GET
https://api.powerly.app
/api/v1/orders/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the order.

Example:
doloribus
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/orders/doloribus" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 3
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

GET the review of the specified order.

GET
https://api.powerly.app
/api/v1/orders/{orderId}/review
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

orderId
string
required
Example:
vitae
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/orders/vitae/review" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 2
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

Create a review for the specified order.

POST
https://api.powerly.app
/api/v1/orders/{orderId}/review
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

orderId
string
required
Example:
ea

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/orders/ea/review" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "rating=2"\
    --form "content=I had a great experience with the 50kW fast charger at City Mall. It charged my vehicle from 20% to 80% in about 30 minutes."\
    --form "media[]=@/tmp/php0E7Jez" 

Skip the review for the specified order.

PUT
PATCH
https://api.powerly.app
/api/v1/orders/{orderId}/review/skip
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

orderId
string
required
Example:
delectus
Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/orders/delectus/review/skip" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Payment cards

Retrieve the authenticated user's default payment card.

GET
https://api.powerly.app
/api/v1/payment-cards/default
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payment-cards/default" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 7
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

Set a specific payment card as the default for the authenticated user.

POST
https://api.powerly.app
/api/v1/payment-cards/default/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the default.

Example:
qui
Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payment-cards/default/qui" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Get a list of the authenticated user's saved payment cards.

GET
https://api.powerly.app
/api/v1/payment-cards
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payment-cards" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 6
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

Store a new payment card for the authenticated user.

POST
https://api.powerly.app
/api/v1/payment-cards
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payment-cards" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"molestias\"
}"

Retrieve a specific payment card by its ID.

GET
https://api.powerly.app
/api/v1/payment-cards/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the payment card.

Example:
omnis
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payment-cards/omnis" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 5
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

Update the details of a specific payment card.

PUT
PATCH
https://api.powerly.app
/api/v1/payment-cards/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the payment card.

Example:
et

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/payment-cards/et" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"paymentObject\": [
        \"natus\"
    ]
}"

Delete a specific payment card by its ID.

DELETE
https://api.powerly.app
/api/v1/payment-cards/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the payment card.

Example:
et
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/payment-cards/et" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Payout methods

Get the authenticated user's payout methods

GET
https://api.powerly.app
/api/v1/payout-methods
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payout-methods" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

Get the available payout methods

GET
https://api.powerly.app
/api/v1/payout-methods/available
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payout-methods/available" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

POST add a payout method for the authenticated user

POST
https://api.powerly.app
/api/v1/payout-methods/add/{payoutMethod_name}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

payoutMethod_name
string
required
Example:
minus

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payout-methods/add/minus" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"id\": \"magni\",
    \"userType\": \"individual\",
    \"fullname\": \"YASSER BELHIMER\",
    \"address\": \"quod\",
    \"TIN\": \"HFIIBEB1SDF5644\"
}"

Update a payout method for the authenticated user

POST
https://api.powerly.app
/api/v1/payout-methods/update/{payoutMethod_name}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

payoutMethod_name
string
required
Example:
aut

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payout-methods/update/aut" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"id\": \"voluptate\",
    \"userType\": \"individual\",
    \"fullname\": \"YASSER BELHIMER\",
    \"address\": \"modi\",
    \"TIN\": \"HFIIBEB1SDF5644\"
}"

Delete a payout method from the authenticated user

DELETE
https://api.powerly.app
/api/v1/payout-methods/delete/{payoutMethod_name}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

payoutMethod_name
string
required
Example:
voluptatibus
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/payout-methods/delete/voluptatibus" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Payouts

Get the list of the payouts.

GET
https://api.powerly.app
/api/v1/payouts
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

itemsPerPage
integer

the number of items per page

Example:
7
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payouts?itemsPerPage=7" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

Request a payout.

POST
https://api.powerly.app
/api/v1/payouts/request-payout
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payouts/request-payout" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"payoutMethod\": 10
}"

Power sources

Retrieve a list of media files associated with a specific power source.

GET
https://api.powerly.app
/api/v1/stations/{id}/media

This endpoint returns a collection of media resources linked to the given station. It provides images, videos, or other media types that might be useful for users interacting with the charging station.

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The station for which media files are being retrieved.

Example:
9
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/9/media" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 1
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

GET the list of the power sources.

GET
https://api.powerly.app
/api/v1/stations

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"search\": \"bqwxyryjhbiboydidxefnmemlbgumzontckhzcyvlzdnvcegdzawwfylmz\",
    \"latitude\": -89,
    \"longitude\": -179
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 0
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

GET a specific power source.

GET
https://api.powerly.app
/api/v1/stations/{id}

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the station.

Example:
laborum
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/laborum" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

GET a specific power source by its identifier

GET
https://api.powerly.app
/api/v1/stations/token/{identifier}

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

identifier
string
required
Example:
cupiditate
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/token/cupiditate" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

GET the list of the power source reviews.

GET
https://api.powerly.app
/api/v1/stations/{stationId}/reviews

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

stationId
string
required
Example:
vel
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/vel/reviews" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

Reviews

GET the list of review options

GET
https://api.powerly.app
/api/v1/reviews/options

Headers

API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/reviews/options" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 10
                                                                                                                    x-ratelimit-remaining
                                                            : 8
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "The API key is invalid or missing."
}

GET the list of reviews

GET
https://api.powerly.app
/api/v1/reviews
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/reviews" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

GET the specified review.

GET
https://api.powerly.app
/api/v1/reviews/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the review.

Example:
possimus
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/reviews/possimus" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    vary
                                                            : Origin
                                                         
{
    "success": 0,
    "message": "Too many requests. Please try again later."
}

Users

API Endpoints for User Management

Key features include:

  • Viewing the details of the authenticated user or any other user (with proper authorization).
  • Updating profile details like name, password, location, and other personal settings.
  • Validating inputs to ensure accurate data is saved.

Get Authenticated User

GET
https://api.powerly.app
/api/v1/users/me
requires authentication

Show Current User Info

Retrieve the profile details of the currently authenticated user.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/users/me" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": 1,
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "latitude": 40.7128,
    "longitude": -74.006
}

Update the authenticated user's profile information. The user can update fields such as their name, password, location, and more.

PUT
PATCH
https://api.powerly.app
/api/v1/users/me
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/users/me" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"G$;X1[I[`\\\"iYw\",
    \"first_name\": \"qdgcvufmjrzkfke\",
    \"last_name\": \"hszynbkfaddujqcezdesetfmb\",
    \"latitude\": -89,
    \"longitude\": -180,
    \"vat_id\": \"hy\",
    \"currency\": \"aut\",
    \"country_id\": 9
}"

Delete the authenticated user.

DELETE
https://api.powerly.app
/api/v1/users/me
requires authentication

Deletes the currently authenticated user's account.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/users/me" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]
{
    "success": 0,
    "message": "Failed!"
}

Vehicle management

Get the list of vehicle makes.

GET
https://api.powerly.app
/api/v1/vehicles/makes
requires authentication

This endpoint retrieves a list of vehicle makes available in the system. Optionally, you can filter the results by the owner of the makes.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

owner
boolean

optional If true, filters the makes by those added by the current user.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/vehicles/makes?owner=1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
  "data": [
    {
         "id": 2,
	    "code": "TSL",
	    "name": "Tesla",
	    "logo": "http:\/\/localhost:8080\/storage\/https:\/\/www.carlogos.org\/car-logos\/tesla-logo-2007-full-640.png",
	    "added_by": null
    },
    ...
  ],
  "success": 1,
  "message": "Done!"
}
{
    "success": 0,
    "message": "Failed!"
}

Get the list of vehicle models.

GET
https://api.powerly.app
/api/v1/vehicles/models/{make_id?}
requires authentication

This endpoint retrieves a list of vehicle models associated with a particular vehicle make. Optionally, you can filter the results by the owner of the models.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

make_id
integer

optional The ID of the vehicle make to filter models.

Example:
1

Query Parameters

owner
boolean

optional If true, filters the models by those added by the current user.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/vehicles/models/1?owner=1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
  "data": [
    {
 		"id": 2,
 		"code": "Model X",
 		"name": "Model X 100D",
 		"make": {
 			"name": "Tesla",
 			"id": 2
 		},
 		"added_by": null
 	},
    ...
  ],
  "success": 1,
  "message": "Done!"
}
{
    "success": 0,
    "message": "Failed!"
}

Get the list of charging connectors.

GET
https://api.powerly.app
/api/v1/vehicles/connectors
requires authentication

This endpoint retrieves a list of charging connectors available in the system.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/vehicles/connectors" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
  "data": [
    {
         "id": 3,
         "name": "Type 1 - J1772",
  		"icon": "http:\/\/gasablev4.loc\/connectors\/Type 1.png",
  		"type": "",
  		"max_power": 0
    },
    ...
  ],
  "success": 1,
  "message": "Done!"
}
{
    "success": 0,
    "message": "Failed!"
}

Display a listing of the user's vehicles.

GET
https://api.powerly.app
/api/v1/vehicles
requires authentication

This endpoint retrieves a list of all vehicles associated with the currently authenticated user.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/vehicles" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 61,
            "title": "Tesla Model SA",
            "make": {},
            "model": {},
            "year": 2022,
            "version": "V1",
            "color": "Red",
            "license_plate": "ABC-1234",
            "fuel_type": "Electric",
            "charging_connector": {},
            "active": 1,
            "owner": {},
            "detail": {}
        }
    ],
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "Failed!"
}

Store a newly created vehicle.

POST
https://api.powerly.app
/api/v1/vehicles
requires authentication

This endpoint allows users to add a new vehicle to their account. The request must include details about the vehicle, such as model, year, and other optional details like color and license plate.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/vehicles" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Tesla Model S\",
    \"vehicle_model_id\": 1,
    \"year\": 2020,
    \"version\": \"Long Range\",
    \"color\": \"Red\",
    \"license_plate\": \"XYZ 123\",
    \"fuel_type\": \"Electric\",
    \"charging_connector_id\": 1,
    \"active\": 1,
    \"vehicle_details\": {
        \"battery_capacity\": 75,
        \"charging_speed\": 150,
        \"safety_rating\": 5,
        \"mileage\": 2,
        \"fuel_efficiency\": 11
    }
}"
Example response:
{
    "data": {
        "id": 61,
        "title": "Tesla Model SA",
        "make": {},
        "model": {},
        "year": 2022,
        "version": "V1",
        "color": "Red",
        "license_plate": "ABC-1234",
        "fuel_type": "Electric",
        "charging_connector": {},
        "active": 1,
        "owner": {},
        "detail": {}
    },
    "success": 1,
    "message": "Done!"
}
{
    "message": "The given data was invalid."
}
{
    "success": 0,
    "message": "Failed!"
}

Display the specified vehicle.

GET
https://api.powerly.app
/api/v1/vehicles/{id}
requires authentication

This endpoint retrieves the details of a specific vehicle owned by the currently authenticated user.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the vehicle.

Example:
1
vehicle
string
required

The ID of the vehicle.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/vehicles/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 61,
        "title": "Tesla Model SA",
        "make": {},
        "model": {},
        "year": 2022,
        "version": "V1",
        "color": "Red",
        "license_plate": "ABC-1234",
        "fuel_type": "Electric",
        "charging_connector": {},
        "active": 1,
        "owner": {},
        "detail": {}
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "Vehicle not found or not owned by the user."
}
{
    "success": 0,
    "message": "Failed!"
}

Update the specified vehicle.

PUT
PATCH
https://api.powerly.app
/api/v1/vehicles/{id}
requires authentication

This endpoint allows users to update the details of an existing vehicle.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the vehicle.

Example:
1
vehicle
string
required

The ID of the vehicle.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/vehicles/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Tesla Model S\",
    \"vehicle_model_id\": 1,
    \"year\": 2020,
    \"version\": \"Long Range\",
    \"color\": \"Red\",
    \"license_plate\": \"XYZ 123\",
    \"fuel_type\": \"Electric\",
    \"charging_connector_id\": 1,
    \"active\": 1,
    \"vehicle_details\": {
        \"battery_capacity\": 75,
        \"charging_speed\": 150,
        \"safety_rating\": 5,
        \"mileage\": 5,
        \"fuel_efficiency\": 14
    }
}"
Example response:
{
    "data": {
        "id": 61,
        "title": "Tesla Model SA",
        "make": {},
        "model": {},
        "year": 2022,
        "version": "V1",
        "color": "Red",
        "license_plate": "ABC-1234",
        "fuel_type": "Electric",
        "charging_connector": {},
        "active": 1,
        "owner": {},
        "detail": {}
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "Vehicle not found or not owned by the user."
}
{
    "message": "The given data was invalid."
}
{
    "success": 0,
    "message": "Failed!"
}

Remove the specified vehicle.

DELETE
https://api.powerly.app
/api/v1/vehicles/{id}
requires authentication

This endpoint deletes the vehicle from the system. Only the owner of the vehicle can delete it.

Headers

Authorization
Example:
Bearer {YOUR_BEARER_TOKEN}
API-KEY
Example:
140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the vehicle.

Example:
1
vehicle
string
required

The ID of the vehicle.

Example:
1
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/vehicles/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "Vehicle not found or not owned by the user."
}
{
    "success": 0,
    "message": "Failed!"
}