Delivery API | SHiiP
  • Home
  • The Guide
  • Getting Started
    • Authentication
    • Request Format & Responses
    • Errors & Status Codes
    • Rate Limits
    • Wallet Funding
    • Webhook
  • API references
    • Get User Profile
    • International HsCode
    • Get Shipment Rates
    • Get Single Rate
    • Get Available Couriers
    • Book Shipment
    • Assign Shipment
    • Get All Shipments
    • Cancel Shipment
    • Track Shipment
  • Extras
    • Promotions & Discount
Powered by GitBook
On this page
  • Request
  • Response
  1. API references

Get User Profile

Get your user profile details

Request

curl --location 'https://delivery-staging.apiideraos.com/api/v2/token/user/myprofile' \
--header 'Authorization: Bearer Secret Key'
import requests

url = "https://delivery-staging.apiideraos.com/api/v2/token/user/myprofile"

payload = {}
headers = {
  'Authorization': 'Bearer Secret Key'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "net/http"

url = URI("https://delivery-staging.apiideraos.com/api/v2/token/user/myprofile")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer Secret Key"

response = https.request(request)
puts response.read_body
// Some code
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://delivery-staging.apiideraos.com/api/v2/token/user/myprofile',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer Secret Key'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
const myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer Secret Key");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://delivery-staging.apiideraos.com/api/v2/token/user/myprofile", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://delivery-staging.apiideraos.com/api/v2/token/user/myprofile"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer Secret Key")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

Response

{
    "data": {
        "firstname": "Chris",
        "lastname": "Miracle",
        "email": "chris@gmail.com",
        "phone": "+2348131133039",
        "balance": "997499.99",
        "id": 96,
        "companyName": "Lazy Corp",
        "user_analytics": {
            "shipments": 15,
            "totalDelivered": 1,
            "totalExpense": "1235416.09",
            "cancelled": 0,
            "pending": 12
        },
        "email_encoded": "Y2hyaXNzdG26272pcmExNUBnbWFpbC5jb20=",
        "user_unsubscribe_link": "https://shiip.app/unsubscribe/Y2hya29nj21pcmExNUBnbWFpbC5jb20=",
        "warehouse_business": null,
        "roles": []
    },
    "status": true,
    "message": "OK",
    "status_code": 200
}
{
    "status": false,
    "message": "Secret Key not found",
    "status_code": 401
}
PreviousWebhookNextInternational HsCode

Last updated 8 months ago