Get started

    API Endpoint

        https://youdomain.com/
                

Sandsgo API system help you to manage the user accounts like sending shipments or account managment.

To use this API, you will not need an API key.

login to user account

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://youdomain.com/user/api-v1/login.php' \
    --header 'Cookie: lang=ar' \
    --form 'phone="123456"' \
    --form 'password="123456"'
                
            

This end point could help you to get user auth token :
https://youdomain.com/user/api-v1/login.php



Result example :

{
    "status": "Success",
    "phone": "123456",
    "avatar": "avatar.png",
    "usersId": "1",
    "auth": "ABCDEFGHI123456789"
}
                

QUERY PARAMETERS

Field Type Description
phone String (Required) User phone number
password String (Required) User Password

get user account data

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://youdomain.com/user/api-v1/account.php' \
    --header 'Cookie: lang=ar' \
    --form 'auth="ABCDEFGHI123456789"'
                
            

This end point could help you to get user data :
https://youdomain.com/user/api-v1/account.php



Result example :

{
    "status": "Success",
    "name": "John",
    "phone": "123456789",
    "avatar": "https://youdomain.com/avatar.png",
    "usersId": "1"
}
                

QUERY PARAMETERS

Field Type Description
auth String (Required) User auth token

Get shipments

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://youdomain.com/user/api-v1/shipments.php' \
    --header 'Cookie: lang=ar' \
    --form 'auth="ABCDEFGHI123456789"' \
    --form 'limit="50"'
                
            

This end point could help you to get user shipments list:
https://youdomain.com/user/api-v1/shipments.php



Result example :

{
    "status": "Success",
    "shipments_status": {
        "all": 1,
        "open": 0,
        "ready": 0,
        "progress": 0,
        "success": 1,
        "delay": 0,
        "successReturnEdit": 0,
        "successReturn": 0,
        "edit": 0,
        "refusePay": 0,
        "refuse": 0,
        "noResponse": 0,
        "delayMove": 0,
        "cancel": 0
    },
    "shipments": [
        {
            "id": "1",
            "user_id": "1",
            "user_name": "John",
            "requester_name": "John",
            "address": "45 makka street",
            "city_id": "1",
            "city_name": "Amman",
            "city_sub_id": "1",
            "city_sub": "makka street",
            "phone": "123456789",
            "price": "10",
            "shipping": "2",
            "notes": "",
            "status": "success",
            "location": "",
            "userSort": null,
            "creating_date": "2022-08-08 14:54:02",
            "last_update": "2022-08-11 17:18:11"
        },
    ]
}
                

QUERY PARAMETERS

Field Type Description
auth String (Required) User auth token
limit Integer (Required) Maximum number of shipments

Get shipment details

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://youdomain.com/user/api-v1/shipment-view.php' \
    --header 'Cookie: lang=ar' \
    --form 'auth="ABCDEFGHI123456789"' \
    --form 'code="11122233"'
                
            

This end point could help you to get shipment details list:
https://youdomain.com/user/api-v1/shipment-view.php



Result example :

{
    "status": "Success",
    "shipment": {
        "id": "11122233",
        "user_id": "2",
        "user_name": "John",
        "requester_name": "John",
        "address": "Makka",
        "city_id": "1",
        "city_name": "Amman",
        "city_sub_id": "2",
        "city_sub": "Makka street",
        "phone": "123456789",
        "price": "10",
        "shipping": "2",
        "notes": "",
        "status": "success",
        "location": "",
        "creating_date": "2022-08-08 15:48:44",
        "last_update": "2022-08-11 17:16:25"
    }
}
                
            

QUERY PARAMETERS

Field Type Description
auth String (Required) User auth token
code Integer (Required) Shipment code

Get website data

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://sandsgo.com/user/api-v1/website.php' \
    --header 'lang=ar' \
                
            

This end point could help you to get website data like website name and currancy:
https://youdomain.com/user/api-v1/website.php



Result example :

{
    "status": "Success",
    "website_name": "SANDSGO LLC",
    "website_logo": "https://sandsgo.com/logo.png",
    "website_icon": "https://sandsgo.com/favicon.png",
    "website_curranncy": "USD",
    "website_url": "https://youdomain.com/"
}
                

This end point do not require any parameters

Get user wallet

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://sandsgo.com/user/api-v1/wallet.php' \
    --header 'lang=ar' \
    --form 'auth="ABCDEFGHI123456789"' \
    --form 'date_filter="2022-01-01 to 2022-10-01"'
                
            

This end point could help you to get user wallet balance:
https://youdomain.com/user/api-v1/wallet.php



Result example :

{
    "status": "Success",
    "total": 100
}
                
            

QUERY PARAMETERS

Field Type Description
auth String (Required) User auth token
date_filter String (optional) Filter date (Optional) to set a specific just send one date to set a range bettween two dates-> send the date in this format -> 2015-10-01 to 2022-10-01

Get user wallet history

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://sandsgo.com/user/api-v1/wallet-history.php' \
    --header 'Cookie: lang=ar' \
    --form 'auth="ABCDEFGHI123456789"' \
    --form 'date_filter="2022-01-01 to 2022-10-01"'
                
            

This end point could help you to get user wallet history and transactions:
https://youdomain.com/user/api-v1/wallet-history.php



Result example :

{
    "status": "Success",
    "shipments": [
        {
            "id": "1",
            "price": "10",
            "shipping": "2",
            "status": "success",
            "last_update": "2022-08-12 06:01:27"
        }
    ],
    "deposits": []
}
                

QUERY PARAMETERS

Field Type Description
auth String (Required) User auth token
date_filter String (optional) Filter date (Optional) to set a specific just send one date to set a range bettween two dates-> send the date in this format -> 2015-10-01 to 2022-10-01

Add shipment

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 'https://sandsgo.com/user/api-v1/add-shipment.php' \
    --header 'Cookie: lang=ar' \
    --form 'auth="ABCDEFGHI123456789"' \
    --form 'code="11223344"' \
    --form 'name="John"' \
    --form 'address="Egypt, new cairo"' \
    --form 'city="3"' \
    --form 'city_sub="1"' \
    --form 'phone="123456789"' \
    --form 'price="10"' \
    --form 'gps="31.95185,35.941295"' \
    --form 'notes=""'
                
            

This end point could help you to add shipments:
https://youdomain.com/user/api-v1/add-shipment.php



Result example :

{
    "status": "Success",
    "Shipment_id": 11223344
}
                

QUERY PARAMETERS

Field Type Description
auth String (Required) User auth token
code String (Optional) Shipment code
name String (Required) Order requester name
address String (Required) Address
city String (Required) City Id
city_sub String (Required) Sub city Id
phone String (Required) Phone number
price String or double (Required) Shipment price
gps String (Optional) Location coordinate [lng,lat]
notes String (Optional) Extra notes

Get cities list

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST
    'https://sandsgo.com/user/api-v1/cities.php' \
    --header 'Cookie: lang=ar'
                    
                

This end point could help you to cities list with IDs:
https://youdomain.com/user/api-v1/cities.php



Result example :
{
    "cities": [
        {
            "id": "1",
            "name": "City example"
        },
        {
            "id": "2",
            "name": "City example"
        },
        {
            "id": "3",
            "name": "City example"
        },
        {
            "id": "4",
            "name": "City example"
        },
    ]
}
                

This end point do not require any parameters

Get sub cities list

                    
    # Here is a curl exam# Here is a curl example
    curl --location --request POST 
    'https://sandsgo.com/user/api-v1/cities_sub.php' \
    --header 'Cookie: lang=ar' \
    --form 'city_id="1"'
                    
                

This end point could help you to sub cities list with IDs:
https://youdomain.com/user/api-v1/cities_sub.php



Result example :
{
    "cities": [
        {
            "id": "1",
            "name": "City sub example"
        },
        {
            "id": "2",
            "name": "City sub example"
        },
        {
            "id": "3",
            "name": "City sub example"
        },
        {
            "id": "4",
            "name": "City sub example"
        },
    ]
}
                

QUERY PARAMETERS

Field Type Description
city_id Integer (Required) Main city id

Errors

The Sandsgo API uses the following error messages:

Response Meaning
Wrong phone number Unknown or unvalid phone. This error appears if you use an unknow phone number or if your phone number is wrong.
Wrong password Wrong password for the phone number.
Ivalid Auth Token Unvalid auth token in auth parametr.
This account is not verifed! The user account is not verifed or do not have access to this part.