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\": \"7117\",
    \"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\": 12
}"
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\": \"consectetur\",
    \"power_source_id\": \"animi\"
}"

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\": \"ut\",
    \"order_id\": 18
}"

Get Orders Insights

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

Retrieves sales insights for the orders, including daily sales data, total earnings, charge point statistics, and average rating.

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/orders/insights" \
    --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!",
    "data": {
        "sales": {
            "labels": [
                "2025-02-25",
                "2025-02-26",
                "2025-02-27",
                "2025-02-28",
                "2025-03-01",
                "2025-03-02",
                "2025-03-03",
                "2025-03-04",
                "2025-03-05",
                "2025-03-06",
                "2025-03-07",
                "2025-03-08",
                "2025-03-09",
                "2025-03-10",
                "2025-03-11",
                "2025-03-12",
                "2025-03-13",
                "2025-03-14",
                "2025-03-15",
                "2025-03-16",
                "2025-03-17",
                "2025-03-18",
                "2025-03-19",
                "2025-03-20",
                "2025-03-21",
                "2025-03-22",
                "2025-03-23",
                "2025-03-24",
                "2025-03-25"
            ],
            "datasets": [
                {
                    "label": "Sales",
                    "backgroundColor": "#f87979",
                    "data": [
                        1,
                        4,
                        0,
                        0,
                        0,
                        1,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        3,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        56,
                        0,
                        50,
                        0,
                        30,
                        36,
                        36,
                        36,
                        0,
                        2
                    ]
                }
            ]
        },
        "totalEarnings": "564152.12",
        "totalChargePoints": 11,
        "activeChargePoints": 5,
        "averageRating": "2.90"
    }
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Failed!"
}

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:
doloremque
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/orders/doloremque" \
    --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:
commodi
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/orders/commodi/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:
quam

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/orders/quam/review" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "rating=1"\
    --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/phpC5opcn" 

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:
eaque
Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/orders/eaque/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:
earum
Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payment-cards/default/earum" \
    --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\": \"harum\"
}"

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:
quia
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payment-cards/quia" \
    --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:
amet

Body Parameters

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

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:
non
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/payment-cards/non" \
    --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:
aut

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payout-methods/add/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\": \"qui\",
    \"userType\": \"company\",
    \"fullname\": \"YASSER BELHIMER\",
    \"address\": \"impedit\",
    \"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:
quaerat

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/payout-methods/update/quaerat" \
    --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\": \"aut\",
    \"userType\": \"company\",
    \"fullname\": \"YASSER BELHIMER\",
    \"address\": \"possimus\",
    \"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:
sit
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/payout-methods/delete/sit" \
    --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:
4
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/payouts?itemsPerPage=4" \
    --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\": 8
}"

Power centers management

Categories CRUD


Get a list of categories.

GET
https://api.powerly.app
/api/v1/categories
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

type
string

Optional type filter, defaults to "charging-site".

Example:
quo
search
string

Optional search query to filter categories.

Example:
assumenda
itemsPerPage
integer

Number of items per page (-1 for all).

Example:
4
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/categories?type=quo&search=assumenda&itemsPerPage=4" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 58,
            "type": "charging-site",
            "name": "maximes",
            "color": "#D2B48C"
        },
        {
            "id": 57,
            "type": "charging-site",
            "name": "tests",
            "color": "#A52A2A"
        }
    ],
    "links": {
        "first": "http://localhost:8080/api/v1/categories?page=1",
        "last": "http://localhost:8080/api/v1/categories?page=11",
        "prev": null,
        "next": "http://localhost:8080/api/v1/categories?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 11,
        "path": "http://localhost:8080/api/v1/categories",
        "per_page": 5,
        "to": 5,
        "total": 55
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Failed!"
}

Create a new category.

POST
https://api.powerly.app
/api/v1/categories
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/categories" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"\\\"service 1\\\"\",
    \"type\": \"\\\"charging-site\\\"\"
}"
Example response:
{
    "data": {
        "id": 59,
        "type": "charging-site",
        "name": "service 1",
        "color": "#D2B48C"
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Validation failed.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "type": [
            "The type field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Get details of a specific category.

GET
https://api.powerly.app
/api/v1/categories/{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
integer
required

The ID of the category.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/categories/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": 59,
        "type": "charging-site",
        "name": "service 1",
        "color": "#D2B48C"
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Category not found."
}
{
    "success": 0,
    "message": "Failed!"
}

Update an existing category.

PUT
PATCH
https://api.powerly.app
/api/v1/categories/{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
integer
required

The ID of the category.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/categories/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Electronics\"
}"
Example response:
{
    "data": {
        "id": 59,
        "type": "charging-site",
        "name": "service 1",
        "color": "#D2B48C"
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Access denied."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Validation failed.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Delete a category.

DELETE
https://api.powerly.app
/api/v1/categories/{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
integer
required

The ID of the category.

Example:
1
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/categories/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": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Access denied."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Failed!"
}

Range prices CRUD


Get a list of range prices for a given power center.

GET
https://api.powerly.app
/api/v1/power-centers/{power_center_id}/range-prices
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

power_center_id
integer
required

The ID of the power center.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/power-centers/1/range-prices" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "success": true,
    "data": [
        {
            "id": 1,
            "price": 10.5,
            "starting_time": "08:00",
            "ending_time": "18:00"
        }
    ]
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Failed!"
}

Store a new range price for a power center.

POST
https://api.powerly.app
/api/v1/power-centers/{power_center_id}/range-prices
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

power_center_id
integer
required

The ID of the power center.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://api.powerly.app/api/v1/power-centers/1/range-prices" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"price\": 99.99,
    \"starting_time\": \"09:00\",
    \"ending_time\": \"17:00\"
}"
Example response:
{
    "success": true,
    "data": {
        "id": 2,
        "price": 15.75,
        "starting_time": "09:00",
        "ending_time": "17:00"
    }
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "The price must be a number.",
    "errors": {
        "price": [
            "The price must be a number."
        ],
        "ending_time": [
            "The ending time does not match the format H:i.",
            "The ending time must be a date after starting time."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Retrieve a specific range price.

GET
https://api.powerly.app
/api/v1/range-prices/{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
integer
required

The ID of the range price.

Example:
2
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/range-prices/2" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "success": true,
    "data": {
        "id": 2,
        "price": 15.75,
        "starting_time": "09:00",
        "ending_time": "17:00"
    }
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Failed!"
}

Update an existing range price.

PUT
PATCH
https://api.powerly.app
/api/v1/range-prices/{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
integer
required

The ID of the range price.

Example:
2

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/range-prices/2" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"price\": 99.99,
    \"starting_time\": \"09:00\",
    \"ending_time\": \"17:00\"
}"
Example response:
{
    "success": true,
    "data": {
        "id": 2,
        "price": 12,
        "starting_time": "10:00",
        "ending_time": "20:00"
    }
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "The price must be a number.",
    "errors": {
        "price": [
            "The price must be a number."
        ],
        "ending_time": [
            "The ending time does not match the format H:i.",
            "The ending time must be a date after starting time."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Delete a range price.

DELETE
https://api.powerly.app
/api/v1/range-prices/{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
integer
required

The ID of the range price.

Example:
2
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/range-prices/2" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "success": true
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "Failed!"
}

Power centers CRUD


Get Insights for a Specific Power Center

GET
https://api.powerly.app
/api/v1/power-centers/{power_center_id}/insights
requires authentication

Retrieves insights for a specified Power Center, including earnings, charging time, energy consumption, and order count for today, this week, and this month.

Headers

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

URL Parameters

power_center_id
string
required

The ID of the power center.

Example:
laboriosam
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/power-centers/laboriosam/insights" \
    --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!",
    "data": {
        "today": {
            "earnings": "0.00",
            "chargingTime": "0.00",
            "energyConsumed": "0.00",
            "ordersNb": 0
        },
        "thisWeek": {
            "earnings": "0.00",
            "chargingTime": "0.00",
            "energyConsumed": "0.00",
            "ordersNb": 0,
            "date": "18-03-2025"
        },
        "thisMonth": {
            "earnings": "0.00",
            "chargingTime": "0.00",
            "energyConsumed": "0.00",
            "ordersNb": 0,
            "date": "23-02-2025"
        }
    }
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "Failed!"
}

Power centers list

GET
https://api.powerly.app
/api/v1/power-centers
requires authentication

Get the list of power centers owned by the current user.

Retrieves a paginated list of charging stations (power centers) that belong to the authenticated user.

Headers

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

Query Parameters

search
string

Optional. Filter stations by identifier, title, or description.

Example:
"Fast Charger"
itemsPerPage
integer

Optional. Number of items per page (default: 15). Must be at least 1.

Example:
10

Body Parameters

Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/power-centers?search=%22Fast+Charger%22&itemsPerPage=10" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"search\": \"dolor\",
    \"itemsPerPage\": 28
}"
Example response:
{
  "success": 1,
  "message": "Done!",
  "data": [
    {
      "id": 23,
      "identifier": "tesst",
      "category": "EV_CHARGER",
      "price_unit": "minutes",
      "title": "tesst",
      ...
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 2,
    "per_page": 3,
    "total": 5
  }
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "The items per page must be at least 1.",
    "errors": {
        "itemsPerPage": [
            "The items per page must be at least 1."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Create a new power center

POST
https://api.powerly.app
/api/v1/power-centers
requires authentication

Creates a new power center for the authenticated user. The request must include required details such as title and category. Returns the created power center on success.

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/power-centers" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"identifier\": \"EV_CHARGER_ABC123\",
    \"title\": \"Fast Charger Station\",
    \"description\": \"A high-speed EV charging station.\",
    \"category\": \"EV_CHARGER\",
    \"latitude\": \"36.630751\",
    \"longitude\": \"2.945236\",
    \"address_line_1\": \"Tessala El Merdja, Algiers, Algeria\",
    \"zipcode\": \"16000\",
    \"city\": \"Algiers\",
    \"contact_number\": \"+213550123456\",
    \"open_time\": \"08:00:00\",
    \"close_time\": \"22:00:00\",
    \"price\": 5.99,
    \"price_currency\": \"USD\",
    \"price_unit\": \"minutes\",
    \"type\": 1,
    \"session_limit_value\": 60,
    \"session_limit_type\": \"minutes\",
    \"amenities\": [
        15
    ],
    \"connectors\": [
        {
            \"id\": 1,
            \"number\": 2
        },
        {
            \"id\": 2,
            \"number\": 1
        }
    ],
    \"listed\": 1
}"
Example response:
{
  "success": 1,
  "message": "Done!",
  "data": {
      "id": 23,
      "identifier": "tesst",
      "category": "EV_CHARGER",
      "price_unit": "minutes",
      "title": "tesst",
      ...
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "The Title field is required.",
    "errors": {
        "title": [
            "The Title field is required."
        ],
        "category": [
            "The category field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Show a power center

GET
https://api.powerly.app
/api/v1/power-centers/{id}
requires authentication

Retrieves the details of a specific power center by its ID. Only accessible if the power center exists.

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 power center.

Example:
5
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/power-centers/5" \
    --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!",
  "data": {
      "id": 23,
      "identifier": "tesst",
      "category": "EV_CHARGER",
      "price_unit": "minutes",
      "title": "tesst",
      ...
  }
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Failed!"
}

Update a power center

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

Updates an existing power center’s details. Only the owner of the power center can perform this action. Returns the updated resource on success.

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 power center.

Example:
5

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/power-centers/5" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Fast Charger Station\",
    \"description\": \"A high-speed EV charging station.\",
    \"latitude\": \"36.630751\",
    \"longitude\": \"2.945236\",
    \"address_line_1\": \"Tessala El Merdja, Algiers, Algeria\",
    \"zipcode\": \"16000\",
    \"city\": \"Algiers\",
    \"contact_number\": \"+213550123456\",
    \"open_time\": \"08:00:00\",
    \"close_time\": \"22:00:00\",
    \"price\": 5.99,
    \"price_currency\": \"USD\",
    \"category\": \"EV_CHARGER\",
    \"amenities\": [
        19
    ],
    \"connectors\": [
        {
            \"id\": 1,
            \"number\": 2
        },
        {
            \"id\": 2,
            \"number\": 1
        }
    ],
    \"price_unit\": \"minutes\",
    \"session_limit_value\": 60,
    \"session_limit_type\": \"minutes\",
    \"listed\": false,
    \"type\": 1
}"
Example response:
{
  "success": 1,
  "message": "Done!",
  "data": {
      "id": 23,
      "identifier": "tesst",
      "category": "EV_CHARGER",
      "price_unit": "minutes",
      "title": "tesst",
      ...
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
  "success": 0,
  "message": "The Title field is required.",
  "errors": {
    "title": [
       "The Title field is required."
    ],
  }
}
{
    "success": 0,
    "message": "Failed!"
}

Destroy a power center

DELETE
https://api.powerly.app
/api/v1/power-centers/{id}
requires authentication

Deletes a power center from the system. Only the owner of the power center can delete it. Once deleted, the power center is no longer accessible.

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 power center.

Example:
5
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/power-centers/5" \
    --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": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "Failed!"
}

Groups CRUD


Get a list of groups.

GET
https://api.powerly.app
/api/v1/groups
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

search
string

Optional search query to filter groups.

Example:
ut
itemsPerPage
integer

Number of groups per page.

Example:
16
power-centers
boolean

If set to true, includes associated power centers in the response.

Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/groups?search=ut&itemsPerPage=16&power-centers=" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "Main Group",
            "company_name": "Energy Co.",
            "license_code": "XYZ123",
            "charge_points_count": 5,
            "power_centers": []
        }
    ],
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Failed!"
}

Create a new group.

POST
https://api.powerly.app
/api/v1/groups
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/groups" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Energy Savers\",
    \"company_name\": \"GreenTech Ltd.\",
    \"license_code\": \"LC-12345\",
    \"power_centers\": [
        \"sed\"
    ]
}"
Example response:
{
    "data": {
        "id": 2,
        "name": "Secondary Group",
        "company_name": "Green Energy",
        "license_code": "ABC987",
        "charge_points_count": 0,
        "power_centers": []
    },
    "success": 1,
    "message": "Created successfully!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Validation error",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Get details of a specific group.

GET
https://api.powerly.app
/api/v1/groups/{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
integer
required

The ID of the group.

Example:
1

Query Parameters

power-centers
boolean

If set to true, includes associated power centers in the response.

Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/groups/1?power-centers=" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
  "data": {
    "id": 1231,
   "name": "group 1",
   "company_name": "test",
   "license_code": null,
   "power_centers_number": 2,
   "power_centers": [
	 {
	    "id": 20,
		"identifier": "CP:D4Cb5",
		"category": "EV_CHARGER",
		...
	},
	...
   ]
  },
  "success": 1,
  "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Failed!"
}

Update an existing group.

PUT
PATCH
https://api.powerly.app
/api/v1/groups/{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
integer
required

The ID of the group.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/groups/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Energy Savers\",
    \"company_name\": \"GreenTech Ltd.\",
    \"license_code\": \"LC-12345\",
    \"power_centers\": [
        \"nesciunt\"
    ]
}"
Example response:
{
    "data": {
        "id": 2,
        "name": "Updated Group Name",
        "company_name": "Updated Energy",
        "license_code": "NEW456",
        "charge_points_count": 3,
        "power_centers": []
    },
    "success": 1,
    "message": "Updated successfully!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Access denied."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Validation failed.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Delete a group.

DELETE
https://api.powerly.app
/api/v1/groups/{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
integer
required

The ID of the group.

Example:
1
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/groups/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": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Access denied."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Failed!"
}

Sites CRUD


Get a list of sites.

GET
https://api.powerly.app
/api/v1/sites
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

search
string

Optional search query to filter groups.

Example:
iure
itemsPerPage
integer

Number of groups per page. Defaults to 15.

Example:
7
power-centers
boolean

If set to true, includes associated power centers in the response.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/sites?search=iure&itemsPerPage=7&power-centers=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": 159,
            "category": {
                "id": 51,
                "type": "charging-site",
                "name": "test",
                "color": "#654321"
            },
            "name": "test",
            "status": true,
            "active": true,
            "start_date": "2024-10-10",
            "end_date": "2024-10-11",
            "integration_code": null,
            "address": {
                "id": 161,
                "latitude": "29.608637026617",
                "longitude": "14.589843749997",
                "country": {
                    "id": 195,
                    "name": "Algeria"
                },
                "state": "xxxxx",
                "city": "xxxxx",
                "zipcode": "xxxxx",
                "address_line_1": "CITY 100 LOGS ...."
            }
        }
    ],
    "links": {
        "first": "http://localhost:8080/api/v1/sites?page=1",
        "last": "http://localhost:8080/api/v1/sites?page=22",
        "prev": null,
        "next": "http://localhost:8080/api/v1/sites?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 22,
        "path": "http://localhost:8080/api/v1/sites",
        "per_page": 5,
        "to": 5,
        "total": 107
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Failed!"
}

Create a new site.

POST
https://api.powerly.app
/api/v1/sites
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/sites" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Downtown EV Station\",
    \"category\": 5,
    \"status\": false,
    \"start_date\": \"2024-06-01\",
    \"end_date\": \"2024-12-31\",
    \"integration_code\": \"EVS12345\",
    \"power_centers\": [
        1
    ],
    \"address\": {
        \"country_id\": 195,
        \"state\": \"Algiers\",
        \"city\": \"Douera\",
        \"zipcode\": \"16049\",
        \"address_line_1\": \"CITY 100 LOGS\",
        \"address_line_2\": \"Building A, Floor 3\",
        \"latitude\": 36.657913,
        \"longitude\": 3.940137
    }
}"
Example response:
{
    "data": {
        "id": 164,
        "category": null,
        "name": "Site 11",
        "status": true,
        "active": true,
        "start_date": null,
        "end_date": null,
        "integration_code": null,
        "address": {
            "id": 166,
            "latitude": "0",
            "longitude": "0",
            "country": {
                "id": 195,
                "name": "Algeria"
            },
            "state": "Algiers",
            "city": "Douera",
            "address_line_1": "Dekakna"
        }
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Validation error.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Get details of a specific site.

GET
https://api.powerly.app
/api/v1/sites/{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
integer
required

The ID of the site.

Example:
1

Query Parameters

power-centers
boolean

If set to true, includes associated power centers in the response.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/sites/1?power-centers=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": 164,
        "category": null,
        "name": "Site 11",
        "status": true,
        "active": true,
        "start_date": null,
        "end_date": null,
        "integration_code": null,
        "address": {
            "id": 166,
            "latitude": "0",
            "longitude": "0",
            "country": {
                "id": 195,
                "name": "Algeria"
            },
            "state": "Algiers",
            "city": "Douera",
            "address_line_1": "Dekakna"
        }
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Failed!"
}

Update an existing site.

PUT
PATCH
https://api.powerly.app
/api/v1/sites/{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
integer
required

The ID of the site.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/sites/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Downtown EV Station\",
    \"category\": 5,
    \"status\": false,
    \"start_date\": \"2024-06-01\",
    \"end_date\": \"2024-12-31\",
    \"integration_code\": \"EVS12345\",
    \"power_centers\": [
        1
    ],
    \"address\": {
        \"country_id\": 195,
        \"state\": \"Algiers\",
        \"city\": \"Douera\",
        \"zipcode\": \"16049\",
        \"address_line_1\": \"CITY 100 LOGS\",
        \"address_line_2\": \"Building A, Floor 3\",
        \"latitude\": 36.657913,
        \"longitude\": 2.940137
    }
}"
Example response:
{
    "data": {
        "id": 164,
        "category": null,
        "name": "Updated Site",
        "status": true,
        "active": true,
        "start_date": null,
        "end_date": null,
        "integration_code": null,
        "address": {
            "id": 166,
            "latitude": "0",
            "longitude": "0",
            "country": {
                "id": 195,
                "name": "Algeria"
            },
            "state": "Algiers",
            "city": "Douera",
            "address_line_1": "Updated Address"
        }
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Access denied."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Validation error.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Delete a site.

DELETE
https://api.powerly.app
/api/v1/sites/{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
integer
required

The ID of the site.

Example:
1
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/sites/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": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Access denied."
}
{
    "success": 0,
    "message": "Record not found."
}
{
    "success": 0,
    "message": "Failed!"
}

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:
14
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/14/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
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 GET \
    --get "https://api.powerly.app/api/v1/stations" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"search\": \"ndsggxuthjtrvslpwsscqgzyyjjktawdyzgycspjojjd\",
    \"latitude\": -90,
    \"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}
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 station.

Example:
mollitia
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/mollitia" \
    --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 a specific power source by its identifier

GET
https://api.powerly.app
/api/v1/stations/token/{identifier}
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

identifier
string
required
Example:
sed
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/token/sed" \
    --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 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:
in
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/stations/in/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:
aspernatur
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/reviews/aspernatur" \
    --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\": \"`)\\\\E[*SzeA\",
    \"first_name\": \"cfkvmbrzsxgqbxt\",
    \"last_name\": \"pvegzozlmhetzbuuujobkda\",
    \"latitude\": -90,
    \"longitude\": -180,
    \"vat_id\": \"cumtjbepomztwk\",
    \"currency\": \"velit\",
    \"country_id\": 12
}"

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\": 15,
        \"fuel_efficiency\": 16
    }
}"
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\": 7,
        \"fuel_efficiency\": 4
    }
}"
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!"
}

Workers CRUD

Reset a worker's balance.

GET
https://api.powerly.app
/api/v1/workers/{worker_id}/reset-balance
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

worker_id
integer
required

The ID of the worker.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/workers/1/reset-balance" \
    --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": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "Failed!"
}

Get a list of workers.

GET
https://api.powerly.app
/api/v1/workers
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

search
string

Optional search query to filter workers.

Example:
aut
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/workers?search=aut" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
 "data":[
     {
         "id":33,
         "first_name":"service",
         "last_name":"test 1",
         "name":"service test 1",
         "email":"[email protected]",
         "rfid":"123131321122",
         "expire_at":"2025-03-31",
         "cash_on_hands":"0"
     }
     ...
 ],
 "success":1,
 "message":"Done!"
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Failed!"
}

Create a new worker.

POST
https://api.powerly.app
/api/v1/workers
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/workers" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"[email protected]\",
    \"rfid\": \"123456789012\",
    \"expire_at\": \"2025-12-31\"
}"
Example response:
{
    "data": {
        "id": 34,
        "first_name": "service",
        "last_name": "test 2",
        "name": "service test 2",
        "email": "[email protected]",
        "rfid": "123131321123",
        "expire_at": "2025-03-31",
        "cash_on_hands": "0"
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "The firstname field is required.",
    "errors": {
        "first_name": [
            "The firstname field is required."
        ],
        "last_name": [
            "The lastname field is required."
        ],
        "email": [
            "The e-mail address field is required."
        ],
        "rfid": [
            "The rfid field is required."
        ],
        "expire_at": [
            "The expiration date field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Get details of a specific worker.

GET
https://api.powerly.app
/api/v1/workers/{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
integer
required

The ID of the worker.

Example:
1
Example request:
curl --request GET \
    --get "https://api.powerly.app/api/v1/workers/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": 34,
        "first_name": "service",
        "last_name": "test 2",
        "name": "service test 2",
        "email": "[email protected]",
        "rfid": "123131321123",
        "expire_at": "2025-03-31",
        "cash_on_hands": "0"
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated."
}
{
    "success": 0,
    "message": "Failed!"
}

Update an existing worker.

PUT
PATCH
https://api.powerly.app
/api/v1/workers/{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
integer
required

The ID of the worker.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.powerly.app/api/v1/workers/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "API-KEY: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"[email protected]\",
    \"rfid\": \"123456789012\",
    \"expire_at\": \"2025-12-31\"
}"
Example response:
{
    "data": {
        "id": 34,
        "first_name": "service",
        "last_name": "test 2",
        "name": "service test 2",
        "email": "[email protected]",
        "rfid": "123131321123",
        "expire_at": "2025-03-31",
        "cash_on_hands": "0"
    },
    "success": 1,
    "message": "Done!"
}
{
    "success": 0,
    "message": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "The firstname field is required.",
    "errors": {
        "first_name": [
            "The firstname field is required."
        ],
        "last_name": [
            "The lastname field is required."
        ],
        "email": [
            "The e-mail address field is required."
        ],
        "rfid": [
            "The rfid field is required."
        ],
        "expire_at": [
            "The expiration date field is required."
        ]
    }
}
{
    "success": 0,
    "message": "Failed!"
}

Delete a worker.

DELETE
https://api.powerly.app
/api/v1/workers/{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
integer
required

The ID of the worker.

Example:
1
Example request:
curl --request DELETE \
    "https://api.powerly.app/api/v1/workers/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": "The API key is invalid or missing."
}
{
    "success": 0,
    "message": "Unauthenticated"
}
{
    "success": 0,
    "message": "Access denied"
}
{
    "success": 0,
    "message": "Failed!"
}