openapi: 3.0.3
info:
  title: 'Powerly API documentation'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://api.powerly.app'
paths:
  /api/v1/auth/register:
    post:
      summary: Register
      operationId: register
      description: 'This endpoint registers a new user with the provided data. The user will receive an email verification link.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: "The user's email."
                  example: user@example.com
                password:
                  type: string
                  description: "The user's password. Minimum 8 characters."
                  example: secret
                first_name:
                  type: string
                  description: "The user's first name."
                  example: John
                last_name:
                  type: string
                  description: "The user's last name."
                  example: Doe
                latitude:
                  type: number
                  description: "The user's latitude for location."
                  example: 37.7749
                longitude:
                  type: number
                  description: "The user's longitude for location."
                  example: -122.4194
                country_id:
                  type: integer
                  description: "The ID of the user's country."
                  example: 1
                vat_id:
                  type: string
                  description: "The user's VAT ID."
                  example: '123456789'
                currency:
                  type: string
                  description: "The user's currency."
                  example: USD
              required:
                - email
                - password
                - currency
      security: []
  /api/v1/auth/login:
    post:
      summary: Login
      operationId: login
      description: 'This endpoint allows a user to log in by providing their email and password.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: "The user's email."
                  example: user@example.com
                password:
                  type: string
                  description: "The user's password."
                  example: secret
              required:
                - email
                - password
      security: []
  /api/v1/auth/email/check:
    post:
      summary: 'Email check'
      operationId: emailCheck
      description: "Checks if a user with the specified email exists in the system.\n<aside class=\"warning\">The \"require_verification\" field indicates that email verification will be required even if the user exists and attempts to log in.</aside>"
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 1
                  message: Done!
                  data:
                    email_exists: 1
                    require_verification: 1
                properties:
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
                  data:
                    type: object
                    properties:
                      email_exists:
                        type: integer
                        example: 1
                      require_verification:
                        type: integer
                        example: 1
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: nschamberger@example.com
              required:
                - email
      security: []
  /api/v1/auth/email/verify:
    post:
      summary: 'Verify email'
      operationId: verifyEmail
      description: 'To verify the email, you will need the email used in the registration and code received in this email,'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 135231
                    customer_type: C
                    first_name: ''
                    last_name: ''
                    full_name: ''
                    contact_number: '966977977974'
                    email: someemail@gasable.com
                    balance: '0.00'
                    access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnYXNhYmxlLnRlc3QiLCJpYXQiOjE3MTYwMjc4ODQsImV4cCI6MTc0NzU2Mzg4NCwiZGF0YSI6eyJ1c2VyX2lkIjoxMzUyMzEsInVzZXJfdHlwZSI6MX19.NlcGZdzy4kKACb1fJSSxL-VVJIwvvTbTqtz0_Rvv3_E
                  success: 1
                  message: Done!
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 135231
                      customer_type:
                        type: string
                        example: C
                      first_name:
                        type: string
                        example: ''
                      last_name:
                        type: string
                        example: ''
                      full_name:
                        type: string
                        example: ''
                      contact_number:
                        type: string
                        example: '966977977974'
                      email:
                        type: string
                        example: someemail@gasable.com
                      balance:
                        type: string
                        example: '0.00'
                      access_token:
                        type: string
                        example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnYXNhYmxlLnRlc3QiLCJpYXQiOjE3MTYwMjc4ODQsImV4cCI6MTc0NzU2Mzg4NCwiZGF0YSI6eyJ1c2VyX2lkIjoxMzUyMzEsInVzZXJfdHlwZSI6MX19.NlcGZdzy4kKACb1fJSSxL-VVJIwvvTbTqtz0_Rvv3_E
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        422:
          description: 'Invalid data'
          content:
            application/json:
              schema:
                type: object
                example:
                  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.'
                properties:
                  data:
                    type: object
                    properties:
                      require_verification:
                        type: integer
                        example: 1
                      verification_token:
                        type: string
                        example: 27ee3f39-8768-4bc3-a6ae-440d87660b02
                      can_resend_in_seconds:
                        type: integer
                        example: 60
                      available_attempts:
                        type: integer
                        example: 2
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Incorrect verification code.'
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 'Must be 4 digits.'
                  example: '3133'
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: rafaela41@example.org
              required:
                - code
                - email
      security: []
  /api/v1/auth/resend-verification:
    post:
      summary: 'Resend verification code'
      operationId: resendVerificationCode
      description: "You can resend the verification code to the user's email address.\n\nNote that resending the code reduces the number of allowable code attempts, thereby increasing the time until the next code can be sent.\n\n<aside class=\"warning\">This is only possible while the verification code is active and the user still has attempts.\n\nYou will receive a 429 error if the user has not waited long enough before requesting the verification code to be resent.\n</aside>"
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: 'Please enter the verification code to continue.'
                  data:
                    type: object
                    properties:
                      require_verification:
                        type: integer
                        example: 1
                      verification_token:
                        type: string
                        example: 27ee3f39-8768-4bc3-a6ae-440d87660b02
                      can_resend_in_seconds:
                        type: integer
                        example: 60
                      available_attempts:
                        type: integer
                        example: 3
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'Must be a valid email address. Must not be greater than 255 characters.'
                  example: stephon33@example.net
              required:
                - email
      security: []
  /api/v1/auth/password/forgot:
    post:
      summary: 'Request a password reset code.'
      operationId: requestAPasswordResetCode
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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: ''
                properties:
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: 'Please enter the verification code to continue.'
                  data:
                    type: object
                    properties:
                      require_verification:
                        type: integer
                        example: 1
                      verification_token:
                        type: string
                        example: aacc04ec-8f5f-4e99-a2d5-539f66426aa4
                      can_resend_in_seconds:
                        type: integer
                        example: 60
                      available_attempts:
                        type: integer
                        example: 3
                      sent_to:
                        type: string
                        example: ''
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email address of the user.'
                  example: user@example.com
              required:
                - email
      security: []
  /api/v1/auth/password/reset:
    post:
      summary: "Reset the user's password using the verification code."
      operationId: resetTheUsersPasswordUsingTheVerificationCode
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Done.
                properties:
                  message:
                    type: string
                    example: Done.
        422:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"message\": \"The verification code doesn't match.\""
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: failed
                properties:
                  message:
                    type: string
                    example: failed
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: integer
                  description: 'The 4-digit verification code sent via email.'
                  example: 1234
                email:
                  type: string
                  description: 'The email associated with the user account.'
                  example: user@example.com
                password:
                  type: string
                  description: 'The new password.'
                  example: '"NewSecureP@ss1"'
                password_confirmation:
                  type: string
                  description: 'Must match the password field.'
                  example: '"NewSecureP@ss1"'
              required:
                - code
                - email
                - password
                - password_confirmation
      security: []
  /api/v1/auth/logout:
    post:
      summary: Logout
      operationId: logout
      description: 'This endpoint logs out the authenticated user by deleting their current access token.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Auth
  /api/v1/balance/offers:
    get:
      summary: "Display a listing of the available balance offers.\n\nThis method retrieves balance offers either for the user's country\nor a specific country if `country_id` is provided."
      operationId: displayAListingOfTheAvailableBalanceOffersThisMethodRetrievesBalanceOffersEitherForTheUsersCountryorASpecificCountryIfcountryIdIsProvided
      description: ''
      parameters:
        -
          in: query
          name: country_id
          description: "int|null The ID of the country to fetch offers for. If not provided, the user's country will be used."
          example: 1
          required: false
          schema:
            type: integer
            description: "int|null The ID of the country to fetch offers for. If not provided, the user's country will be used."
            example: 1
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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!
                properties:
                  data:
                    type: array
                    example:
                      -
                        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
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        title_en:
                          type: string
                          example: 'Premium Package'
                        title_ar:
                          type: string
                          example: 'الباقة الممتازة'
                        title_es:
                          type: string
                          example: 'Paquete Premium'
                        price:
                          type: string
                          example: '13620.94'
                        bonus:
                          type: string
                          example: '0.00'
                        vat:
                          type: string
                          example: '0.00'
                        total_price:
                          type: string
                          example: '13620.94'
                        total_balance:
                          type: string
                          example: '13620.94'
                        popular:
                          type: boolean
                          example: false
                        active:
                          type: boolean
                          example: true
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'No available balance offers for the specified country.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'No available balance offers for the specified country.'
      tags:
        - Balance
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                country_id:
                  type: integer
                  description: ''
                  example: 1
      security: []
  /api/v1/balance/top-up:
    post:
      summary: "Top up the user's balance with the selected balance offer.\n\nThis method processes a top-up transaction by charging the user through the\nselected payment gateway and updating their balance."
      operationId: topUpTheUsersBalanceWithTheSelectedBalanceOfferThisMethodProcessesATopUpTransactionByChargingTheUserThroughTheselectedPaymentGatewayAndUpdatingTheirBalance
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: refill_balance_success
                  data:
                    new_balance: 1500.0
                    next_action:
                      type: redirect
                      url: 'https://paymentgateway.com/redirect?session_id=xyz123'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: refill_balance_success
                  data:
                    type: object
                    properties:
                      new_balance:
                        type: number
                        example: 1500.0
                      next_action:
                        type: object
                        properties:
                          type:
                            type: string
                            example: redirect
                          url:
                            type: string
                            example: 'https://paymentgateway.com/redirect?session_id=xyz123'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Payment processing failed. Please try again later.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Payment processing failed. Please try again later.'
      tags:
        - Balance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                offer_id:
                  type: integer
                  description: 'The ID of the balance offer selected by the user.'
                  example: 1
                payment_method_id:
                  type: string
                  description: 'The payment method ID used for the transaction.'
                  example: '"pm_1234567890"'
              required:
                - offer_id
                - payment_method_id
      security: []
  /api/v1/countries:
    get:
      summary: 'GET the countries list'
      operationId: gETTheCountriesList
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - Countries
      security: []
  /api/v1/countries/currencies:
    get:
      summary: 'Get the list of currencies.'
      operationId: getTheListOfCurrencies
      description: 'This endpoint returns a list of all unique currencies available in the system. The response includes an array of currency codes.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": 1,\n  \"message\": \"Done!\",\n  \"data\": [\n     {\n \t\t\"currency_iso\": \"AED\"\n \t},\n \t{\n \t\t\"currency_iso\": \"AFN\"\n \t},\n \t{\n \t\t\"currency_iso\": \"ALL\"\n \t},\n \t{\n \t\t\"currency_iso\": \"AMD\"\n \t},\n \t{\n \t\t\"currency_iso\": \"ANG\"\n \t},\n ...]\n}"
        401:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": 0,\n  \"message\": \"The API key is invalid or missing.\"\n}\n    *"
      tags:
        - Countries
      security: []
  /api/v1/device:
    get:
      summary: "Display the authenticated user's device information."
      operationId: displayTheAuthenticatedUsersDeviceInformation
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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é !'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 9
                      device_type:
                        type: integer
                        example: 2
                      device_model:
                        type: string
                        example: android
                      device_version:
                        type: string
                        example: null
                      device_language:
                        type: string
                        example: fr
                      updated_at:
                        type: string
                        example: '2025-02-13 21:56:03'
                      app_version:
                        type: string
                        example: '2.1'
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: 'Terminé !'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Not Found'
                properties:
                  message:
                    type: string
                    example: 'Not Found'
      tags:
        - 'Device Management'
    put:
      summary: "Update or create the authenticated user's device information."
      operationId: updateOrCreateTheAuthenticatedUsersDeviceInformation
      description: ''
      parameters:
        -
          in: header
          name: Accept-Language
          description: ''
          example: 'string The preferred response language. Example: "fr"'
          schema:
            type: string
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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é !'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 9
                      device_type:
                        type: integer
                        example: 2
                      device_model:
                        type: string
                        example: android
                      device_version:
                        type: string
                        example: null
                      device_language:
                        type: string
                        example: fr
                      updated_at:
                        type: string
                        example: '2025-02-13 21:56:03'
                      app_version:
                        type: string
                        example: '2.1'
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: 'Terminé !'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Validation Error'
                  errors:
                    device_imei:
                      - 'The device IMEI is required.'
                properties:
                  message:
                    type: string
                    example: 'Validation Error'
                  errors:
                    type: object
                    properties:
                      device_imei:
                        type: array
                        example:
                          - 'The device IMEI is required.'
                        items:
                          type: string
      tags:
        - 'Device Management'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                device_imei:
                  type: string
                  description: 'nullable The device IMEI number.'
                  example: '"123456789012345"'
                device_token:
                  type: string
                  description: 'nullable The device push notification token.'
                  example: '"abcdef123456"'
                device_type:
                  type: integer
                  description: 'nullable The type of device (1 = Android, 2 = iOS, 3 = Huawei).'
                  example: 1
                device_model:
                  type: string
                  description: 'nullable The model of the device.'
                  example: '"Samsung Galaxy S21"'
                device_version:
                  type: string
                  description: 'nullable The OS version of the device.'
                  example: '"Android 12"'
                app_version:
                  type: string
                  description: 'nullable The version of the installed app.'
                  example: '"1.2.3"'
                lang:
                  type: string
                  description: 'nullable The language code to set for the device.'
                  example: '"fr"'
  /api/v1/orders:
    get:
      summary: 'GET the list of orders.'
      operationId: gETTheListOfOrders
      description: ''
      parameters:
        -
          in: query
          name: status
          description: 'The status of the orders to filter by.'
          example: complete
          required: false
          schema:
            type: string
            description: 'The status of the orders to filter by.'
            example: complete
            enum:
              - active
              - complete
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - Orders
    post:
      summary: 'POST start charging and create a new order.'
      operationId: pOSTStartChargingAndCreateANewOrder
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: string
                  description: ''
                  example: quis
                power_source_id:
                  type: string
                  description: ''
                  example: consequatur
              required:
                - quantity
                - power_source_id
  /api/v1/orders/stop:
    post:
      summary: 'POST stop charging and close the order.'
      operationId: pOSTStopChargingAndCloseTheOrder
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                power_source_id:
                  type: string
                  description: ''
                  example: natus
                order_id:
                  type: integer
                  description: ''
                  example: 16
              required:
                - power_source_id
                - order_id
  '/api/v1/orders/{id}':
    get:
      summary: 'GET the specified order.'
      operationId: gETTheSpecifiedOrder
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - Orders
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the order.'
        example: non
        required: true
        schema:
          type: string
  '/api/v1/orders/{orderId}/review':
    get:
      summary: 'GET the review of the specified order.'
      operationId: gETTheReviewOfTheSpecifiedOrder
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - Orders
    post:
      summary: 'Create a review for the specified order.'
      operationId: createAReviewForTheSpecifiedOrder
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Orders
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                rating:
                  type: integer
                  description: 'Must be between 1 and 5.'
                  example: 1
                content:
                  type: string
                  description: 'The review content.'
                  example: '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.'
                media:
                  type: array
                  description: 'Must be an image. Must not be greater than 5120 kilobytes.'
                  items:
                    type: string
                    format: binary
              required:
                - rating
                - content
                - media
    parameters:
      -
        in: path
        name: orderId
        description: ''
        example: eaque
        required: true
        schema:
          type: string
  '/api/v1/orders/{orderId}/review/skip':
    put:
      summary: 'Skip the review for the specified order.'
      operationId: skipTheReviewForTheSpecifiedOrder
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Orders
    parameters:
      -
        in: path
        name: orderId
        description: ''
        example: corporis
        required: true
        schema:
          type: string
  /api/v1/payment-cards/default:
    get:
      summary: "Retrieve the authenticated user's default payment card."
      operationId: retrieveTheAuthenticatedUsersDefaultPaymentCard
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - 'Payment cards'
  '/api/v1/payment-cards/default/{id}':
    post:
      summary: 'Set a specific payment card as the default for the authenticated user.'
      operationId: setASpecificPaymentCardAsTheDefaultForTheAuthenticatedUser
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - 'Payment cards'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the default.'
        example: placeat
        required: true
        schema:
          type: string
  /api/v1/payment-cards:
    get:
      summary: "Get a list of the authenticated user's saved payment cards."
      operationId: getAListOfTheAuthenticatedUsersSavedPaymentCards
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - 'Payment cards'
    post:
      summary: 'Store a new payment card for the authenticated user.'
      operationId: storeANewPaymentCardForTheAuthenticatedUser
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - 'Payment cards'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'The payment card token provided by the payment gateway.'
                  example: explicabo
              required:
                - token
  '/api/v1/payment-cards/{id}':
    get:
      summary: 'Retrieve a specific payment card by its ID.'
      operationId: retrieveASpecificPaymentCardByItsID
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - 'Payment cards'
    put:
      summary: 'Update the details of a specific payment card.'
      operationId: updateTheDetailsOfASpecificPaymentCard
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - 'Payment cards'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentObject:
                  type: array
                  description: 'The updated payment card details.'
                  example:
                    - doloribus
                  items:
                    type: string
              required:
                - paymentObject
    delete:
      summary: 'Delete a specific payment card by its ID.'
      operationId: deleteASpecificPaymentCardByItsID
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - 'Payment cards'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the payment card.'
        example: sapiente
        required: true
        schema:
          type: string
  '/api/v1/stations/{id}/media':
    get:
      summary: 'Retrieve a list of media files associated with a specific power source.'
      operationId: retrieveAListOfMediaFilesAssociatedWithASpecificPowerSource
      description: "This endpoint returns a collection of media resources linked to the given station.\nIt provides images, videos, or other media types that might be useful for users interacting with the charging station."
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - 'Power sources'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The station for which media files are being retrieved.'
        example: 20
        required: true
        schema:
          type: integer
  /api/v1/stations:
    get:
      summary: 'GET the list of the power sources.'
      operationId: gETTheListOfThePowerSources
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - 'Power sources'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                search:
                  type: string
                  description: 'Must be at least 2 characters.'
                  example: hyzpxtspeqxmflubjwcujrnctissdrvggbzvqaijyfogjgdcfhrsuqmuujquzsalymqbhwlcrsgovp
                latitude:
                  type: number
                  description: 'This field is required when <code>longitude</code> is present. Must be between -90 and 90.'
                  example: -89
                longitude:
                  type: number
                  description: 'This field is required when <code>latitude</code> is present. Must be between -180 and 180.'
                  example: -180
  '/api/v1/stations/{id}':
    get:
      summary: 'GET a specific power source.'
      operationId: gETASpecificPowerSource
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        429:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Too many requests. Please try again later.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Too many requests. Please try again later.'
      tags:
        - 'Power sources'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the station.'
        example: quibusdam
        required: true
        schema:
          type: string
  '/api/v1/stations/token/{identifier}':
    get:
      summary: 'GET a specific power source by its identifier'
      operationId: gETASpecificPowerSourceByItsIdentifier
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        429:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Too many requests. Please try again later.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Too many requests. Please try again later.'
      tags:
        - 'Power sources'
    parameters:
      -
        in: path
        name: identifier
        description: ''
        example: officiis
        required: true
        schema:
          type: string
  '/api/v1/stations/{stationId}/reviews':
    get:
      summary: 'GET the list of the power source reviews.'
      operationId: gETTheListOfThePowerSourceReviews
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        429:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Too many requests. Please try again later.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Too many requests. Please try again later.'
      tags:
        - 'Power sources'
      security: []
    parameters:
      -
        in: path
        name: stationId
        description: ''
        example: saepe
        required: true
        schema:
          type: string
  /api/v1/reviews/options:
    get:
      summary: 'GET the list of review options'
      operationId: gETTheListOfReviewOptions
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'The API key is invalid or missing.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'The API key is invalid or missing.'
      tags:
        - Reviews
      security: []
  /api/v1/reviews:
    get:
      summary: 'GET the list of reviews'
      operationId: gETTheListOfReviews
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        429:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Too many requests. Please try again later.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Too many requests. Please try again later.'
      tags:
        - Reviews
  '/api/v1/reviews/{id}':
    get:
      summary: 'GET the specified review.'
      operationId: gETTheSpecifiedReview
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        429:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Too many requests. Please try again later.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Too many requests. Please try again later.'
      tags:
        - Reviews
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the review.'
        example: nam
        required: true
        schema:
          type: string
  /api/v1/users/me:
    get:
      summary: 'Get Authenticated User'
      operationId: getAuthenticatedUser
      description: "Show Current User Info\n\nRetrieve the profile details of the currently authenticated user."
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  first_name: John
                  last_name: Doe
                  email: john.doe@example.com
                  latitude: 40.7128
                  longitude: -74.006
                properties:
                  id:
                    type: integer
                    example: 1
                  first_name:
                    type: string
                    example: John
                  last_name:
                    type: string
                    example: Doe
                  email:
                    type: string
                    example: john.doe@example.com
                  latitude:
                    type: number
                    example: 40.7128
                  longitude:
                    type: number
                    example: -74.006
      tags:
        - Users
    put:
      summary: "Update the authenticated user's profile information. The user can update fields such as their name, password, location, and more."
      operationId: updateTheAuthenticatedUsersProfileInformationTheUserCanUpdateFieldsSuchAsTheirNamePasswordLocationAndMore
      description: ''
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses: {  }
      tags:
        - Users
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: 'Must be at least 8 characters. Must not be greater than 255 characters.'
                  example: 'D^*_!J]kDB'
                first_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: ualvrvhnxtoxtsbb
                last_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: kimrfvrhidqklz
                latitude:
                  type: number
                  description: 'Must be between -90 and 90.'
                  example: -89
                longitude:
                  type: number
                  description: 'Must be between -180 and 180.'
                  example: -179
                vat_id:
                  type: string
                  description: 'Must not be greater than 40 characters.'
                  example: mifqrctfcnzactggl
                currency:
                  type: string
                  description: ''
                  example: voluptatem
                country_id:
                  type: integer
                  description: ''
                  example: 14
    delete:
      summary: 'Delete the authenticated user.'
      operationId: deleteTheAuthenticatedUser
      description: "Deletes the currently authenticated user's account."
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        204:
          description: ''
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - Users
  /api/v1/vehicles/makes:
    get:
      summary: 'Get the list of vehicle makes.'
      operationId: getTheListOfVehicleMakes
      description: "This endpoint retrieves a list of vehicle makes available in the system. Optionally, you can filter\nthe results by the owner of the makes."
      parameters:
        -
          in: query
          name: owner
          description: 'optional If true, filters the makes by those added by the current user.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional If true, filters the makes by those added by the current user.'
            example: true
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n         \"id\": 2,\n\t    \"code\": \"TSL\",\n\t    \"name\": \"Tesla\",\n\t    \"logo\": \"http:\\/\\/localhost:8080\\/storage\\/https:\\/\\/www.carlogos.org\\/car-logos\\/tesla-logo-2007-full-640.png\",\n\t    \"added_by\": null\n    },\n    ...\n  ],\n  \"success\": 1,\n  \"message\": \"Done!\"\n}"
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
  '/api/v1/vehicles/models/{make_id}':
    get:
      summary: 'Get the list of vehicle models.'
      operationId: getTheListOfVehicleModels
      description: "This endpoint retrieves a list of vehicle models associated with a particular vehicle make. Optionally, you can filter\nthe results by the owner of the models."
      parameters:
        -
          in: query
          name: owner
          description: 'optional If true, filters the models by those added by the current user.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional If true, filters the models by those added by the current user.'
            example: true
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n \t\t\"id\": 2,\n \t\t\"code\": \"Model X\",\n \t\t\"name\": \"Model X 100D\",\n \t\t\"make\": {\n \t\t\t\"name\": \"Tesla\",\n \t\t\t\"id\": 2\n \t\t},\n \t\t\"added_by\": null\n \t},\n    ...\n  ],\n  \"success\": 1,\n  \"message\": \"Done!\"\n}"
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
    parameters:
      -
        in: path
        name: make_id
        description: 'Optional parameter. optional The ID of the vehicle make to filter models.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 1
  /api/v1/vehicles/connectors:
    get:
      summary: 'Get the list of charging connectors.'
      operationId: getTheListOfChargingConnectors
      description: 'This endpoint retrieves a list of charging connectors available in the system.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n         \"id\": 3,\n         \"name\": \"Type 1 - J1772\",\n  \t\t\"icon\": \"http:\\/\\/gasablev4.loc\\/connectors\\/Type 1.png\",\n  \t\t\"type\": \"\",\n  \t\t\"max_power\": 0\n    },\n    ...\n  ],\n  \"success\": 1,\n  \"message\": \"Done!\"\n}"
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
  /api/v1/vehicles:
    get:
      summary: "Display a listing of the user's vehicles."
      operationId: displayAListingOfTheUsersVehicles
      description: 'This endpoint retrieves a list of all vehicles associated with the currently authenticated user.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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!
                properties:
                  data:
                    type: array
                    example:
                      -
                        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: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 61
                        title:
                          type: string
                          example: 'Tesla Model SA'
                        make:
                          type: object
                          properties: {  }
                        model:
                          type: object
                          properties: {  }
                        year:
                          type: integer
                          example: 2022
                        version:
                          type: string
                          example: V1
                        color:
                          type: string
                          example: Red
                        license_plate:
                          type: string
                          example: ABC-1234
                        fuel_type:
                          type: string
                          example: Electric
                        charging_connector:
                          type: object
                          properties: {  }
                        active:
                          type: integer
                          example: 1
                        owner:
                          type: object
                          properties: {  }
                        detail:
                          type: object
                          properties: {  }
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
    post:
      summary: 'Store a newly created vehicle.'
      operationId: storeANewlyCreatedVehicle
      description: "This endpoint allows users to add a new vehicle to their account. The request must include\ndetails about the vehicle, such as model, year, and other optional details like color and license plate."
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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!
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 61
                      title:
                        type: string
                        example: 'Tesla Model SA'
                      make:
                        type: object
                        properties: {  }
                      model:
                        type: object
                        properties: {  }
                      year:
                        type: integer
                        example: 2022
                      version:
                        type: string
                        example: V1
                      color:
                        type: string
                        example: Red
                      license_plate:
                        type: string
                        example: ABC-1234
                      fuel_type:
                        type: string
                        example: Electric
                      charging_connector:
                        type: object
                        properties: {  }
                      active:
                        type: integer
                        example: 1
                      owner:
                        type: object
                        properties: {  }
                      detail:
                        type: object
                        properties: {  }
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the vehicle.'
                  example: 'Tesla Model S'
                vehicle_model_id:
                  type: integer
                  description: 'The ID of the vehicle model.'
                  example: 1
                year:
                  type: integer
                  description: 'The year the vehicle was manufactured.'
                  example: 2020
                version:
                  type: string
                  description: 'The version of the vehicle.'
                  example: 'Long Range'
                color:
                  type: string
                  description: 'The color of the vehicle.'
                  example: Red
                license_plate:
                  type: string
                  description: "The vehicle's license plate number."
                  example: 'XYZ 123'
                fuel_type:
                  type: string
                  description: 'The type of fuel used by the vehicle.'
                  example: Electric
                charging_connector_id:
                  type: integer
                  description: 'The ID of the connector used by the vehicle.'
                  example: 1
                active:
                  type: integer
                  description: 'Whether the vehicle is active. Values: 0 (inactive), 1 (active).'
                  example: 1
                  enum:
                    - '0'
                    - '1'
                vehicle_details:
                  type: object
                  description: 'Additional details about the vehicle.'
                  example:
                    battery_capacity: 75
                    charging_speed: 150
                    safety_rating: 5
                  properties:
                    battery_capacity:
                      type: integer
                      description: ''
                      example: 75
                    charging_speed:
                      type: integer
                      description: ''
                      example: 150
                    safety_rating:
                      type: integer
                      description: ''
                      example: 5
                    mileage:
                      type: integer
                      description: ''
                      example: 5
                    fuel_efficiency:
                      type: integer
                      description: ''
                      example: 19
                    extra_notes:
                      type: string
                      description: ''
                      example: null
              required:
                - title
                - vehicle_model_id
                - year
  '/api/v1/vehicles/{id}':
    get:
      summary: 'Display the specified vehicle.'
      operationId: displayTheSpecifiedVehicle
      description: 'This endpoint retrieves the details of a specific vehicle owned by the currently authenticated user.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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!
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 61
                      title:
                        type: string
                        example: 'Tesla Model SA'
                      make:
                        type: object
                        properties: {  }
                      model:
                        type: object
                        properties: {  }
                      year:
                        type: integer
                        example: 2022
                      version:
                        type: string
                        example: V1
                      color:
                        type: string
                        example: Red
                      license_plate:
                        type: string
                        example: ABC-1234
                      fuel_type:
                        type: string
                        example: Electric
                      charging_connector:
                        type: object
                        properties: {  }
                      active:
                        type: integer
                        example: 1
                      owner:
                        type: object
                        properties: {  }
                      detail:
                        type: object
                        properties: {  }
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Vehicle not found or not owned by the user.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Vehicle not found or not owned by the user.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
    put:
      summary: 'Update the specified vehicle.'
      operationId: updateTheSpecifiedVehicle
      description: 'This endpoint allows users to update the details of an existing vehicle.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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!
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 61
                      title:
                        type: string
                        example: 'Tesla Model SA'
                      make:
                        type: object
                        properties: {  }
                      model:
                        type: object
                        properties: {  }
                      year:
                        type: integer
                        example: 2022
                      version:
                        type: string
                        example: V1
                      color:
                        type: string
                        example: Red
                      license_plate:
                        type: string
                        example: ABC-1234
                      fuel_type:
                        type: string
                        example: Electric
                      charging_connector:
                        type: object
                        properties: {  }
                      active:
                        type: integer
                        example: 1
                      owner:
                        type: object
                        properties: {  }
                      detail:
                        type: object
                        properties: {  }
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Vehicle not found or not owned by the user.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Vehicle not found or not owned by the user.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the vehicle.'
                  example: 'Tesla Model S'
                vehicle_model_id:
                  type: integer
                  description: 'The ID of the vehicle model.'
                  example: 1
                year:
                  type: integer
                  description: 'The year the vehicle was manufactured.'
                  example: 2020
                version:
                  type: string
                  description: 'The version of the vehicle.'
                  example: 'Long Range'
                color:
                  type: string
                  description: 'The color of the vehicle.'
                  example: Red
                license_plate:
                  type: string
                  description: "The vehicle's license plate number."
                  example: 'XYZ 123'
                fuel_type:
                  type: string
                  description: 'The type of fuel used by the vehicle.'
                  example: Electric
                charging_connector_id:
                  type: integer
                  description: 'The ID of the connector used by the vehicle.'
                  example: 1
                active:
                  type: integer
                  description: 'Whether the vehicle is active. Values: 0 (inactive), 1 (active).'
                  example: 1
                  enum:
                    - '0'
                    - '1'
                vehicle_details:
                  type: object
                  description: 'Additional details about the vehicle.'
                  example:
                    battery_capacity: 75
                    charging_speed: 150
                    safety_rating: 5
                  properties:
                    battery_capacity:
                      type: integer
                      description: ''
                      example: 75
                    charging_speed:
                      type: integer
                      description: ''
                      example: 150
                    safety_rating:
                      type: integer
                      description: ''
                      example: 5
                    mileage:
                      type: integer
                      description: ''
                      example: 8
                    fuel_efficiency:
                      type: integer
                      description: ''
                      example: 9
                    extra_notes:
                      type: string
                      description: ''
                      example: null
              required:
                - title
                - vehicle_model_id
                - year
    delete:
      summary: 'Remove the specified vehicle.'
      operationId: removeTheSpecifiedVehicle
      description: 'This endpoint deletes the vehicle from the system. Only the owner of the vehicle can delete it.'
      parameters:
        -
          in: header
          name: API-KEY
          description: ''
          example: 140|sVh0Lr2iANbwsQBXo8zT8wux0QN8LQVLDmOzvhHp1dab78b8
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 1
                  message: Done!
                properties:
                  success:
                    type: integer
                    example: 1
                  message:
                    type: string
                    example: Done!
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: 'Vehicle not found or not owned by the user.'
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: 'Vehicle not found or not owned by the user.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: 0
                  message: Failed!
                properties:
                  success:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: Failed!
      tags:
        - 'Vehicle management'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the vehicle.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: vehicle
        description: 'The ID of the vehicle.'
        example: '1'
        required: true
        schema:
          type: string
tags:
  -
    name: Auth
    description: "\n API Endpoints for Authentication\n\n ## Features:\n - **Login**: Allows users to authenticate by providing their email and password.\n - **Registration**: Registers new users and sends an email verification link.\n - **Logout**: Logs out the authenticated user by deleting their access token.\n\n ### Important Notes:\n - After successful registration, an email verification link is sent to the user.\n - The `login` method requires the user to have a verified email before they can log in.\n - Rate limiting is applied to the `login` endpoint to prevent brute force attacks. The limiter is reset after a successful login.\n - The `logout` method only works for authenticated users and deletes the current access token.\n\n ### Response Format:\n - **Success**: On successful operations, a JSON response with user data and, in the case of login, an access token is returned.\n - **Error**: If validation fails or the user cannot be authenticated, appropriate error messages are returned."
  -
    name: Balance
    description: ''
  -
    name: Countries
    description: ''
  -
    name: 'Device Management'
    description: "\nAPIs for managing user devices"
  -
    name: Orders
    description: ''
  -
    name: 'Payment cards'
    description: ''
  -
    name: 'Power sources'
    description: ''
  -
    name: Reviews
    description: ''
  -
    name: Users
    description: "\nAPI Endpoints for User Management\n\nKey features include:\n- Viewing the details of the authenticated user or any other user (with proper authorization).\n- Updating profile details like name, password, location, and other personal settings.\n- Validating inputs to ensure accurate data is saved."
  -
    name: 'Vehicle management'
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: "<div>\n                            <p>This API requires two layers of authentication:</p>\n                            <ul>\n                                <li><strong>API Key:</strong> Sent in the \"API-Key\" header. You can retrieve your token by visiting your dashboard and clicking <b>Generate API key</b>.</li>\n                                <li><strong>Bearer Token:</strong> Sent in the \"Authorization\" header. You can get this after logging in as a user.</li>\n                            </ul>\n                            <div style=\"padding: 10px; border: 1px solid red; background-color: #ffe6e6; color: red;\">\n                                <strong>Note:</strong> API Key is required for all requests. Make sure to include it in the \"API-Key\" header for each API call.\n                            </div>\n                        </div>"
security:
  -
    default: []
