Petfen
  1. User
Petfen
  • Petfen-Account
    • APIs
      • Shipping Address
        • Get List Shipping Address
        • Get Detail Shipping Address
        • Get Default Address
        • Create Shipping Address
        • Update Shipping Address
        • Delete Shipping Addres
      • Seller
        • Verify Phone Number
        • Confirm Phone Number
        • Create Shop
        • Login
        • Renew Access Token Copy
        • Change Password Copy
        • Forgot Password Copy
        • Confirm Forgot Password Copy
        • Logout Copy
      • User Bag
        • Add Item To Bag
        • List Item In Bag
        • Use Item
        • Undo Item To Bag
      • User
        • Register
          POST
        • Confirm Register with OTP
          POST
        • Login
          POST
        • Renew Access Token
          POST
        • Change Password
          POST
        • Forgot Password
          POST
        • Verify OTP Forgot Password
          POST
        • Resend OTP Forgot Password
          POST
        • Confirm Forgot Password
          POST
        • Logout
          POST
        • Get Account Info
          GET
        • List Accounts
          GET
        • Update Account
          PUT
      • Shop
        • Get shop info
        • Follow Shop
        • UnFollow Shop
    • CMS
  • Petfen-Product
    • CMS
      • Internal CMS
        • Product
      • Product
      • Category
      • FlashSale
        • Get List Flash Sale
        • Create Flash Sale
        • Update Flash Sale
        • Get Detail Flash Sale
    • Client
      • Flash Sale
        • Get List Flash Sale
        • Get List Flash Sale Active
        • Get Detail Flash Sale
      • Category
        • Get List Category
        • Get Detail Category
      • Add Wishlist
      • Remove Wishlist
      • Get List Product
      • Get Detail Product
      • Get Detail Product By Id
      • Add Review
      • Get List Review
      • Get Shipping Methods List
      • Get Review Distribution
      • Get Filter Data
    • Seller
      • Product
  • Petfen-Order
    • Order - Create
      POST
    • Order - Cancel
      POST
    • Order - Update
      PUT
    • Order - List
      GET
    • Order - Detail
      GET
    • Cart - Sync
      POST
    • Cart - List
      GET
    • Order - Detail With Payment Id
      GET
    • Order statistic
      GET
  • Petfen-Payment
    • Request Payment
    • Confirm Payment
  • Petfen-voucher
    • Cms
      • Customer Group
        • Create Customer Group
        • Update Customer Group
        • Get Customer Group
        • Detail Customer Group
        • Delete Customer Group
      • Voucher
        • Create Voucher
        • Get Detail Voucher
        • Get List Voucher
    • Client
      • Get Voucher info
      • Get List Voucher
      • Get voucher code available
      • Calculate Discount
      • Check Voucher Valid
  • Petfen-Shipping
    • GHN
      • Delivery
        • Get Province
        • Get Station
        • Get Print Order Token
        • Print Order
        • Get District
        • Get Ward
        • Picking Shifts
        • Delivery Service
        • Calculate Delivery Fee
        • Calculate Expected Delivery Time
        • Create Order
        • Update Order
        • Cancel Order
        • Return Order
        • Get Order Info
        • Update COD
      • Support Ticket
        • Create Support Ticket
        • Get List Ticket
        • Get Ticket Detail
    • Service
      • Delivery
        • Get Province
        • Get District
        • Get Ward
        • Get Picking Shift
        • Get Order Info
        • Delivery Method
        • Calculate Delivery Fee
        • Calculate Expected Delivery Time
        • Create Order
        • Update Order
        • Cancel Order
        • Print Order
        • Return Order
        • Delivery Again
        • Update COD
      • Support Ticket
        • Create
        • Feedback
        • Get List
        • Get Detail
      • IPN Transaction
    • Ahamove
      • Order APIs
        • Estimate order fee with services
        • Estimate order fee with services
        • Estimate order fee with group services
        • Estimate order fee with group services
        • Create order by service ID
        • Create order by service ID
        • Create order by group service ID
        • Create order by group service ID
        • Cancel order by order_id
        • Cancel order by order_id
        • Cancel order by tracking_number
        • Cancel order by tracking_number
        • Get order detail
        • Get order detail
        • Get multiple order detail
        • Get multiple order detail
        • Get order list by tracking number
        • Get order list by tracking number
        • Get order tracking link
        • Get order tracking link
        • Get order callback logs
        • Get order callback logs
        • Update order Information
        • Update order Information
        • Rate a supplier
        • Rate a supplier
      • Master Data
        • Get cities
        • Get cities
        • Get list of services
        • Get list of services
        • Get service details
        • Get service details
      • Account APIs
        • Register account
        • Register account
        • Authenticate token
        • Authenticate token
        • Add child account
        • Add child account
        • Activate child account
        • Activate child account
        • Remove child account
        • Remove child account
        • Get child accounts list
        • Get child accounts list
        • Update user profile
        • Update user profile
    • Get list providers
    • Get list Provinces
    • Get list communes
    • Get list methods
  • Testing
  • Petfen-Invoice
    • S-Invoice
      • Login
      • SInvoice - Create invoice
      • SInvoice - Kê khai thuế
      • SInvoice - Lấy file hóa đơn chuyển đổi (pdf)
    • Partner
      • Auth Login
      • Create Invoice
      • Create Draft Invoice
      • Download Invoice File
      • Get Invoices
      • Cancel Invoice
      • Tax Declaration
      • Invoice Stat
      • Reconciliation
    • Service
      • Create Invoice
      • Update Invoice
      • Download Invoice
      • Cancel Invoice
      • Update Tax Declaration
      • Get Invoices
      • Get Invoice Stat
      • Reconciliation
  • Interal
    • Internal - Get access token
  1. User

Renew Access Token

Developing
POST
/api/v1/auth/token/refresh

Request

Header Params

Body Params application/json

Example
{
    "refresh_token": "vvJNDmaUmgJTs9TTstADlFbshY1c5Z_yRj2PPF6c9ZuPC9FIWMjMvNl9DGiMcYi4sR93FU5VYsUMQNlUKMVZEg=="
}

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 'http://petfen-account.local.com:8081/api/v1/auth/token/refresh' \
--header 'X-Auth-Service: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "refresh_token": "vvJNDmaUmgJTs9TTstADlFbshY1c5Z_yRj2PPF6c9ZuPC9FIWMjMvNl9DGiMcYi4sR93FU5VYsUMQNlUKMVZEg=="
}'

Responses

🟢200OK
application/json
Body

Example
{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50X2F2YXRhciI6Imh0dHBzOi8vYXRtMjc4MTAzLXMzdXNlci52Y29zLmNsb3Vkc3RvcmFnZS5jb20udm4vcGV0ZmVuX2Rldi9hdmF0YXJzL0hIeVV0WEtrQk52bG9TY0Y0Q2ZNYjBMamIzelBCMnlXTnZEb3RwVXMuanBnIiwiYWNjb3VudF9jb2RlIjoiY2YzNjlkZTItYzZiZi00NzAyLTk2YzUtYWJiZjk2ZDc4YzZlIiwiYWNjb3VudF9uYW1lIjoiRG9hbiBRdXkgRGF1IiwiZXhwIjoxNzU5OTEyOTk3LCJwaG9uZV9udW1iZXIiOiIwMzkzMjIxMTkxIn0.A5AXB3doSwyr9tt2BFUgRfVIgnsPEWiiuv5YQHCkbD4",
    "access_token_expiry": 1759912997,
    "refresh_token": "DcngOeOlvDKZQC8zJDaD8X3_-m1782NdsJtq-yex3v0XQGALK3cR-1q__tLgxHVw6zMHhhfcxIhNo6dkzcYFzw==",
    "refresh_token_expiry": 1762418597,
    "user_info": {
        "username": "0393221191",
        "code": "cf369de2-c6bf-4702-96c5-abbf96d78c6e",
        "first_name": "Doan",
        "last_name": "Quy Dau",
        "phone_number": "0393221191",
        "email": "abc@gmail.com",
        "verify_email": "",
        "avatar": "https://atm278103-s3user.vcos.cloudstorage.com.vn/petfen_dev/avatars/HHyUtXKkBNvloScF4CfMb0Ljb3zPB2yWNvDotpUs.jpg",
        "status": "active",
        "vip": 1,
        "balance": 0,
        "account_type": "user",
        "gender": "male",
        "dob": 20200501162534,
        "created_at": "2025-07-17 16:25:19"
    },
    "shop_info": {
        "id": 0,
        "name": "",
        "slug": "",
        "avatar": ""
    },
    "follow_shops": [
        1
    ]
}
Modified at 2025-10-07 08:44:18
Previous
Login
Next
Change Password
Built with