API

How to connect to the API

  1. Open Postman.
  2. Use these authorization details to generate the token:

    POST https://prodapi.shipox.com/api/v1/customer/authenticate

    Body

    {
      "username": "Your Username",
      "password": "Your Password",
      "remember_me": true
    }
  3. In a new tab use the order creation URL. Make sure there is a space between "Bearer" and the token:

    POST https://prodapi.shipox.com/api/v2/customer/order

    Headers

    KeyValue
    AuthorizationBearer YourIdToken
  4. Add the JSON code below. It is filled with example information, please refill it with your own.

    Body

    {
      "sender_data": {
        "address_type": "business",
        "name": "Test Sender",
        "email": "test@gmail.com",
        "apartment": "",
        "building": "",
        "street": "Istanbul Street, near from Fetchr warehouse no7 AlSuly, Almashael",
        "landmark": "",
        "city": {
          "code": "riyadh"
        },
        "country": {
          "id": 191
        },
        "phone": "54 344 3354"
      },
      "recipient_data": {
        "address_type": "business",
        "name": "TEST RECEPIENT",
        "email": "recipient@example.com",
        "apartment": "",
        "building": "",
        "street": "الرياض, اشبيليا, الرصافة, السعودية ",
        "landmark": "",
        "city": {
          "id": 26148057
        },
        "country": {
          "id": 191
        },
        "saudi_address_id": "RFHA4127",
        "phone": "532921078"
      },
      "dimensions": {
        "weight": 1,
        "width": 10,
        "length": 10,
        "height": 10,
        "unit": "METRIC",
        "domestic": false
      },
      "package_type": {
        "courier_type": "TEST"
      },
      "charge_items": [
        {
          "charge_type": "cod",
          "charge": 188,
          "payer": "recipient"
        },
        {
          "charge_type": "service_custom",
          "charge": 0,
          "payer": "recipient"
        }
      ],
      "recipient_not_available": "do_not_deliver",
      "payment_type": "credit_balance",
      "payer": "recipient",
      "parcel_value": 145,
      "fragile": true,
      "note": "WRITE OPTIONAL NOTE HERE",
      "piece_count": "",
      "force_create": true,
      "reference_id": "1932-TEST-REFRENCE"
    }

Courier type options

TESTIntegration testing orders (limit to less than 20 orders to avoid account suspension)
COLD_SCCold/Frozen delivery
B_2_BDelivery from Business To Business

كيفية الربط مع واجهة البرمجة (API)

  1. افتح برنامج Postman.
  2. استخدم بيانات الدخول التالية لإنشاء رمز الدخول (Token):

    POST https://prodapi.shipox.com/api/v1/customer/authenticate

    المحتوى (Body)

    {
      "username": "Your Username",
      "password": "Your Password",
      "remember_me": true
    }
  3. في تبويب جديد استخدم رابط إنشاء الطلب. تأكد من وجود مسافة بين كلمة "Bearer" والرمز:

    POST https://prodapi.shipox.com/api/v2/customer/order

    الترويسات (Headers)

    المفتاحالقيمة
    AuthorizationBearer YourIdToken
  4. أضف كود JSON التالي. الكود معبأ ببيانات تجريبية، الرجاء استبدالها ببياناتكم.

    المحتوى (Body)

    {
      "sender_data": {
        "address_type": "business",
        "name": "Test Sender",
        "email": "test@gmail.com",
        "apartment": "",
        "building": "",
        "street": "Istanbul Street, near from Fetchr warehouse no7 AlSuly, Almashael",
        "landmark": "",
        "city": {
          "code": "riyadh"
        },
        "country": {
          "id": 191
        },
        "phone": "54 344 3354"
      },
      "recipient_data": {
        "address_type": "business",
        "name": "TEST RECEPIENT",
        "email": "recipient@example.com",
        "apartment": "",
        "building": "",
        "street": "الرياض, اشبيليا, الرصافة, السعودية ",
        "landmark": "",
        "city": {
          "id": 26148057
        },
        "country": {
          "id": 191
        },
        "saudi_address_id": "RFHA4127",
        "phone": "532921078"
      },
      "dimensions": {
        "weight": 1,
        "width": 10,
        "length": 10,
        "height": 10,
        "unit": "METRIC",
        "domestic": false
      },
      "package_type": {
        "courier_type": "TEST"
      },
      "charge_items": [
        {
          "charge_type": "cod",
          "charge": 188,
          "payer": "recipient"
        },
        {
          "charge_type": "service_custom",
          "charge": 0,
          "payer": "recipient"
        }
      ],
      "recipient_not_available": "do_not_deliver",
      "payment_type": "credit_balance",
      "payer": "recipient",
      "parcel_value": 145,
      "fragile": true,
      "note": "WRITE OPTIONAL NOTE HERE",
      "piece_count": "",
      "force_create": true,
      "reference_id": "1932-TEST-REFRENCE"
    }

خيارات نوع الشحنة (courier_type)

TESTطلبات اختبار الربط (بحد أقصى أقل من 20 طلباً لتجنب إيقاف الحساب)
COLD_SCتوصيل المبرد/المجمد
B_2_Bالتوصيل من شركة إلى شركة