Safe Logistic Customer Job API Documentation

Detailed API documentation for managing shipments. Includes request and response structures for seamless integration.

1. Getting Started

Follow these steps to start using the API:

  1. Contact Us: Obtain a Credit Customer Account by reaching out to our support team.
  2. Setup Credentials: Get your login credentials (email and password) from the company.
  3. Authentication: Use the login API to retrieve a Bearer token for secure access to all endpoints.

2. Authentication and Token Management

Authenticate to access API endpoints. Use the token from the login API as a Bearer token in headers.

Login API

Method: POST

Endpoint: http://localhost:5096/api/Authentications/login

Request Body

{
  "email": "your_email@example.com",
  "password": "your_password"
}

Response

{
  "token": "your_authentication_token"
}

3. Create Job API

Method: POST

Endpoint: http://localhost:5096/api/CustomerJob/create

Request Body

{
  "countryName": "Bahrain",
  "supplierName": "HDL",
  "consigneeAddress": {
    "name": "Ahmed",
    "addressLine1": "3885 Al Bandariyyah Street",
    "addressLine2": "Apartment 5B",
    "addressLine3": "Al Seef District",
    "postalCode": "10011",
    "phone": "(515) 456-452",
    "mobile": "(515) 456-452",
    "companyName": "Consignee Ltd.",
    "countryName": "USA",
    "cityName": "Buffalo",
    "stateName": "New York"
  },
  "shipperAddress": {
    "name": "Qassim",
    "addressLine1": "Marine Mall",
    "addressLine2": "Floor 2, Office 5",
    "addressLine3": "Downtown",
    "postalCode": "12345",
    "phone": "147147147",
    "mobile": "147147147",
    "companyName": "Shipper Ltd.",
    "countryName": "Bahrain",
    "cityName": "Manama"
  },
  "cargo": [
    {
      "quantity": 2,
      "unitPrice": 12.00,
      "unitWeightKG": 1.5,
      "length": 12,
      "width": 12,
      "height": 12,
      "hsCode": "490199"
    }
  ],
  "shipmentMethod": "Air",
  "descriptionOfGoods": "Books",
  "remark": "Handle with care"
}

Response

{
  "airwayBill": "1234567890",
  "safeAirwaybillNumber": "SA123456",
  "status": "Created"
}

4. Get Job Details API

Method: GET

Endpoint: http://localhost:5096/api/CustomerJob/:airwayBill

Replace :airwayBill with the job s unique Airway Bill number.

Response

{
  "airwayBill": "1234567890",
  "shipperDetails": {
    "name": "Qassim",
    "addressLine1": "Marine Mall",
    "addressLine2": "Floor 2, Office 5",
    "postalCode": "12345",
    "countryName": "Bahrain",
    "cityName": "Manama"
  },
  "consigneeDetails": {
    "name": "Ahmed",
    "addressLine1": "3885 Al Bandariyyah Street",
    "postalCode": "10011",
    "countryName": "USA",
    "cityName": "Buffalo"
  },
  "cargo": [
    {
      "quantity": 2,
      "unitWeightKG": 1.5,
      "description": "Books",
      "length": 12,
      "width": 12,
      "height": 12,
      "hsCode": "490199"
    }
  ],
  "shipmentMethod": "Air",
  "descriptionOfGoods": "Books",
  "documents": [
    {
      "type": "Invoice",
      "url": "http://localhost:5096/documents/invoice/1234567890"
    }
  ]
}