SwiftLogix API (2.0.0)

Introduction

  • The SwiftLogix Open API is a RESTful web service for developers to programmatically interact with SwiftLogix data and delivery management functionality.
  • Every bit of data exchanged between clients and the API is JSON over HTTPS.
  • API key is mandatory in all the API's request.
  • All parameters marked with * are mandatory otherwise optional.
  • If you have questions about using the API, want to share some feedback, or have come across a bug you'd like to report, write us an email at api-support@swiftlogix.io
  • Environments

  • Test Environment - https://sandbox.swiftlogix.io/v2/
  • Prod Environment - https://api.swiftlogix.io/v2/
  • Latest version - v2.0.0, 2023-11-01
  • Orders

    Orders operations.

    Create Order

    Authorizations:
    x-api-key
    Request Body schema: application/json

    requestBody description

    carrier_id
    required
    string

    Carrier is the Logistics Company who does First, Mid and Last Mile Delivery (Ex. Azerpost, EMS, FedEx, DHL). Each Carrier has a ID in SwiftLogix Platform which will be provided by your Carrier

    business_id
    required
    string

    Business ID Issued by Carrier (Ex. AzerPost, EMS)

    package_id
    required
    string

    Unique ID for each Package

    order_ref
    string

    Order Number (if Applicable)

    origin_code
    required
    string

    Initial Origin Code where Sender will Drop / Carrier will accept the Package (PostOffice, PUDO, Agent Location Etc.,)

    destination_code
    required
    string

    Final Destination Code where the receiver will Pickup / Expect Delivery for the Package (PostOffice Index, PUDO Point, Etc.,)

    package_weight
    required
    integer

    Package Weight in Kilo

    receivers_business_id
    string

    Receiver's Internal Customer ID with Business (Account ID, Customer Number)

    receiver_address
    string

    Receiver Full Address ( required if service_type is 1 )

    receiver_first_name
    required
    string

    Receiver's First Name

    receiver_last_name
    required
    string

    Receiver's Last Name

    receiver_email
    string <email>

    Receiver's Email Address

    receiver_phone_no
    required
    string

    Receiver's Phone Number with Country Code

    receiver_passport
    required
    string

    Receiver's Passport Number

    delivery_type
    required
    string
    Enum: "0" "1"
  • 0 - Regular
  • 1 - Express
  • service_type
    required
    integer
    Enum: 0 1
  • 0 - Pickup from postoffice
  • 1 - Delivery to Address
  • order_payment
    required
    integer

    Order Amount (AZN) to be collected. This should not include Delivery fee charged.

    order_payment_status
    required
    integer
    Enum: 0 1
  • 0 - Not paid
  • 1 - Paid
  • fragile
    required
    integer
    Enum: 0 1

    Define if the package is Fragile. It will be used to sort the package.

  • 0 - Not Fragile
  • 1 - Fragile

  • proof_of_delivery
    required
    integer
    Enum: 0 1 2 3 4 5
  • 0 - Not Required
  • 1 - Direct Sign Required
  • 2 - Direct Sign Required with Id
  • 3 - Direct Sign Required with Id and photo
  • 4 - InDirect Sign Allowed
  • 5 - InDirect Sign Required with Id
  • authorized_receiver
    required
    integer
    Enum: 0 1
  • 0 - No
  • 1 - Yes ( if proof delivery has direct sign you can't add authorized receiver)
  • authorized_receiver_name
    string

    Name of the Authorized Receiver ( required if authorized_receiver = 1)

    authorized_receiver_id
    string

    ID of the Authorized Receiver ( required if authorized_receiver = 1)

    authorized_receiver_phone
    string

    Phone number of the Authorized Receiver ( required if authorized_receiver = 1)

    Responses

    Request samples

    Content type
    application/json
    {
    • "carrier_id": "SLX001",
    • "business_id": "BM0001",
    • "package_id": "PG1235211",
    • "order_ref": "4684655131",
    • "origin_code": "AZ9095",
    • "destination_code": "AZ1000",
    • "package_weight": 1.012,
    • "receivers_business_id": "VN52100",
    • "receiver_address": "145 Neftchilar Ave, Baku, Azerbaijan",
    • "receiver_first_name": "Abbas",
    • "receiver_last_name": "Nabiyev",
    • "receiver_email": "abbasnabiyev@yopmail.com",
    • "receiver_phone_no": "994500000000",
    • "receiver_passport": "AA12345678",
    • "delivery_type": "0",
    • "service_type": 0,
    • "order_payment": 1.2,
    • "order_payment_status": 0,
    • "fragile": 0,
    • "proof_of_delivery": 0,
    • "authorized_receiver": 0,
    • "authorized_receiver_name": "Abhas",
    • "authorized_receiver_id": "AZ3334555",
    • "authorized_receiver_phone": "994500000001"
    }

    Response samples

    Content type
    application/json
    {
    • "status": "SUCCESS",
    • "data": {
      }
    }

    Order Status

    Has Rate limit - One request per Second

    Authorizations:
    x-api-key
    path Parameters
    CarrierID
    required
    string

    Carrier is the Logistics Company who does First, Mid and Last Mile Delivery (Ex. Azerpost, EMS, FedEx, DHL). Each Carrier has a ID in SwiftLogix Platform which will be provided by your Carrier

    businessID
    required
    string

    Business ID Issued by Carrier (Ex. AzerPost, EMS)

    Request Body schema: application/json

    requestBody description

    package_id
    required
    Array of arrays

    Package IDs ( Maximum 50 Packages Allowed )

    Responses

    Request samples

    Content type
    application/json
    {
    • "package_id": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "status": "SUCCESS",
    • "message": "All packages found",
    • "data": {
      }
    }

    Order Pay

    Authorizations:
    x-api-key
    path Parameters
    CarrierID
    required
    string

    Carrier is the Logistics Company who does First, Mid and Last Mile Delivery (Ex. Azerpost, EMS, FedEx, DHL). Each Carrier has a ID in SwiftLogix Platform which will be provided by your Carrier

    businessID
    required
    string

    Business ID Issued by Carrier (Ex. AzerPost, EMS)

    packageID
    required
    string

    ID of package

    status
    required
    integer
    Value: 1

    payment status

    Responses

    Request samples

    curl --location --request PUT 'https://sandbox.swiftlogix.co/v2/order/pay/SLX001/BM0001/PKG10001/1' \
    --header 'x-api-key: your key'

    Response samples

    Content type
    application/json
    {
    • "status": "SUCCESS",
    • "message": "Package Paid",
    • "data": {
      }
    }

    Order Delete

    Authorizations:
    x-api-key
    path Parameters
    CarrierID
    required
    string

    Carrier is the Logistics Company who does First, Mid and Last Mile Delivery (Ex. Azerpost, EMS, FedEx, DHL). Each Carrier has a ID in SwiftLogix Platform which will be provided by your Carrier

    businessID
    required
    string

    Business ID Issued by Carrier (Ex. AzerPost, EMS)

    packageID
    required
    string

    ID of package

    status
    required
    integer
    Value: 1

    delete status

    Responses

    Request samples

    curl --location --request DELETE 'https://sandbox.swiftlogix.co/v2/order/delete/SLX001/BM0001/PKG00001/1' \
    --header 'x-api-key: your key'

    Response samples

    Content type
    application/json
    {
    • "status": "SUCCESS",
    • "message": "Package Deleted",
    • "data": {
      }
    }

    Postoffice

    Azerpost Postoffice Details.

    Postoffice Status

    Has Rate limit - One request per 10 Second

    Authorizations:
    x-api-key
    path Parameters
    CarrierID
    required
    string

    Carrier is the Logistics Company who does First, Mid and Last Mile Delivery (Ex. Azerpost, EMS, FedEx, DHL). Each Carrier has a ID in SwiftLogix Platform which will be provided by your Carrier

    businessID
    required
    string

    Business ID Issued by Carrier (Ex. AzerPost, EMS)

    Request Body schema: application/json

    requestBody description

    postOffice
    required
    Array of arrays

    Post Office Code ( pass empty array [] for all postcode)

    postoffice_status
    string

    all , live , offline ( postoffice_status will work on empty array only)

    Responses

    Request samples

    Content type
    application/json
    {
    • "postOffice": [
      ],
    • "postoffice_status": "live"
    }

    Response samples

    Content type
    application/json
    {
    • "status": "SUCCESS",
    • "data": [
      ],
    • "counts": {
      }
    }

    Webhooks

    Webhooks.

    Orders Webhook Webhook

    Authorizations:
    x-api-key
    Request Body schema: application/json

    requestBody description

    event
    string

    Event type of webhook

    created_at
    string

    Status changed date

    vendor_id
    string

    Business ID Issued by Carrier (Ex. AzerPost, EMS)

    scan_post_code
    string

    Current Location of the Package

    status_id
    string
    Enum: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12"

    Current status of package

  • 0 - Order Placed,
  • 1 - Order Accepted,
  • 2 - Picked Up
  • 3 - In Transit
  • 7 - Arrived in Destination Postoffice
  • 4 - Available for Pickup
  • 5 - Delivered
  • 6 - Cancelled
  • 8 - Return Initiated
  • 9 - Return In Transit
  • 10 - Return Arrived Dispatcher Postoffice
  • 11 - Return Available For Pickup
  • 12 - Return Delivered

  • packages
    Array of arrays

    Array of packageID

    package_data
    Array of objects

    List of Packages with weight update , weight_updated => [0 - weight no updated, 1 - weight updated]

    Responses

    Request samples

    Content type
    application/json
    {
    • "event": "order_update",
    • "created_at": "2023-06-12T04:54:03.000Z",
    • "vendor_id": "BM0001",
    • "scan_post_code": "AZ1000",
    • "status_id": "0",
    • "packages": [
      ],
    • "package_data": [
      ]
    }