Repairy Partner API
  1. Authorization
Repairy Partner API
  • Welcome ๐Ÿ‘‹
  • Get Started
  • HTTP Headers
  • Authorization
  • Workshops
  • Bookings
  • Quotes
  • Service Reminder
  • Data Reporting
  • Booking URL
  • Error Codes
  • Technical Support
  • Changelog
  • Webhook
  • Additional Services
  • Service Catalog
  • APIs
    • Authorization
      • Access Token
        POST
      • Refresh Token
        POST
    • Workshops
      • Availabilities
      • Service Catalog
    • Bookings
      • Booking Request with Service Catalog (beta)
      • Booking Request
      • Booking Information
      • Update Booking Information
      • Update Booking Status
    • Quotes
      • Quote Request
    • Service Reminder
      • Service Reminder Notification
      • Service Reminder Information
    • Data Reporting
      • Partner Report
    • Leads
      • Call Lead
  • Data Structures
    • AuthResponse
    • Availability
    • CustomAvailability
    • Car
    • Customer
    • Booking
    • BookingUpdateRequest
    • BookingStatusUpdateConfig
    • Quote
    • ServiceHistory
    • ServiceReminder
    • WebhookRequest
    • ServiceCatalog
    • CallLead
  • Schemas
    • Schemas
      • WebhookRequest
      • ServiceSelection
      • ServiceCatalogItem
      • CallLead
      • Booking
      • BookingUpdateRequest
      • Customer
      • Car
      • Availability
      • CustomAvailability
      • AuthResponse
      • Quote
      • ServiceHistory
      • ServiceReminder
      • BookingStatusUpdateConfig
  1. Authorization

Refresh Token

Cloud Mock
https://mock.apidog.com/m1/839892-0-default
Cloud Mock
https://mock.apidog.com/m1/839892-0-default
POST
/auth/refresh

Token Expiration & Refresh Process#

Access Token Expiration#

Validity Duration: The access token is valid for a period of 48 hours from the moment it is issued.
Expiration Reminder: Once the 48-hour window has passed, the access token will expire, and it will no longer be accepted for API requests.

Token Refresh Process#

Refreshing the Access Token: To avoid service disruptions, the partner must refresh the access token before it expires. This is done using the refresh token that was provided at the time of authentication.
How It Works: The refresh token can be used to obtain a new access token without requiring the partner to re-authenticate, allowing seamless continued access to the API.

Re-authentication Requirement#

When to Re-authenticate: If the refresh token itself has expired or if the token refresh request fails (due to network issues, server issues, etc.), the partner will be required to re-authenticate. This step is crucial to ensure the integrity and security of the access process.
Why Re-authentication is Needed: Re-authentication serves as a security measure to ensure that unauthorized parties cannot access the system with invalid or expired tokens. It effectively resets the authentication cycle to verify the partnerโ€™s identity.

Important Considerations#

Stay Updated on Token Status: Partners should always check the validity of their refresh token before initiating API requests to avoid unexpected authentication failures.
Security First: Re-authentication is mandatory in case of refresh token failure to prevent malicious actors from gaining unauthorized access to the API.
Token Lifespan Awareness: Be mindful of the token's expiration timeline to maintain uninterrupted access to the system.
Reminder: Keep track of token expiration times and ensure timely refreshing or re-authentication to maintain a secure and seamless experience with the API.

Request

Header Params

Body Params application/json

Example
{
    "token": "ACCESS_TOKEN",
    "refreshToken": "REFRESH_TOKEN"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/839892-0-default/auth/refresh' \
--header 'X-Partner-ID: PARTNER_ID' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "ACCESS_TOKEN",
    "refreshToken": "REFRESH_TOKEN"
}'

Responses

๐ŸŸข200OK
application/json
OK
Headers

Body

Example
{
    "token": "ACCESS_TOKEN",
    "refreshToken": "REFRESH_TOKEN",
    "expiresIn": 1674012068
}
๐ŸŸ 400Bad Request
Modified atย 2025-04-03 04:19:03
Previous
Access Token
Next
Availabilities
Built with