Public developer access to the OlyCash API is currently invite-only. Please contact us with your use-case details for evaluation.

Connecting to the API

All API calls will be made over a Secure Socket Layer (SSL) connection using the OAuth2 specification1.

To connect from an app server, first POST a request for an authorization code to:
https://api.olycash.com/v1/authorize
 
Get Authorization Grant
 

REQUEST

PARAMETER Type DESCRIPTION
client_id required The id of the client.
password required The password for the client.
state optional The current state.
redirect_uri required

The access URL.

 

RESPONSE

PARAMETER Type DESCRIPTION
code required The authorization code generated.
state required The new account state.
NOTE: State (optional) helps speed up the data extraction by reducing data retrieval resource requirements by attempting to continue a
previous state if the previous app session expired. A new account state for the app will be automatically created if it is not specified.
 
Using the Authorization Grant output from above, request a token from:
https://api.olycash.com/v1/token
 
Get Access Token
 

REQUEST

PARAMETER Type DESCRIPTION
grant_type required The type of authorization grant.
code required The authorization code.
redirect_uri required

The access url.

 

RESPONSE

PARAMETER Type DESCRIPTION
access_token required The new access token.
expires_in required The period the token expires.
token_type required The type of token generated.
refresh_token required The refresh token.
Next, interact with OlyCash API using the access token in all communications.

 

You can test the API using:
https://api.olycash.com/v1/resource
 
Get Protected Resource (test)
 

REQUEST

 

Authorization: Bearer GE4-fFAGRNJru1FTz99
User-Agent: OlyCash-Android/1.2.2 vAndroid/1.2.2b
Host: android.olycash.com 59.890.111.102
PARAMETER Type DESCRIPTION
client_id required The id of the client.
 

RESPONSE

PARAMETER Type DESCRIPTION
response_code required The response code.
success required The response status.

 

The URL parts for an API call are in the format:
https://api.olycash.com/v1/[part 1]/[part 2]?access_token=(access token)&[extra GET variables]
OR
Send [access token] in the header with a call format (recommended):
Authorization: Bearer [access token]
https://api.olycash.com/v1/[part 1]/[part 2]?[extra GET variables]
 

API Host

https://dev.olycash.com/v1/ (development)
https://api.olycash.com/v1/ (production)

The development environment supports both live and test accounts. All testing should be done on dev.olycash.com, as all requests to api.olycash.com will be billed. If you are getting ready to launch into production, please request production API access via the OlyCash developer dashboard.

Resource URL Patterns:

/authorize
/account
/locations
/codes
/transactions
/files
/money
/customers
/messages
/plugins

Account

Locations

OlyBoss Near Me

 

Parameter Type
DESCRIPTION
user_type required The type of users whose location is desired.
my_location
OR 
starting_address
required

The associative array with the latitude and longitude of user's current location.

OR

The phrase describing the starting address to search.

result_limit optional The limit of the number of results to return.
search_distance optional The radius distance in miles from the starting point which should be searched. Default is 10 miles.
Notes:
Use the given location details to plot the Boss locations on a map.

 

OlyBoss Near Me

/locations/users (GET)

Send

curl -X GET https://api.olycash.com/v1/locations/users
  -d user_type = "boss"
  -d my_location = {
           "latitude":"23023", 
           "longitude":"256562"
          }
     OR
  -d starting_address = "Kyaliwajala"
  -d result_limit = "50"
  -d search_distance = "10"

Recieve (SUCCESS)

http code 200
{
  "count":"4",
  "data": [
    {
      "account_id": "{ACCOUNT ID}",
      "location": {"latitude":"0.351796","longitude":"32.597090"}
    },
    {
      "account_id": "{ACCOUNT ID}",
      "location": {"latitude":"0.351180","longitude":"32.597710"}
    },
    {
      "account_id": "{ACCOUNT ID}",
      "location": {"latitude":"0.352972","longitude":"32.597393"}
    },
    {    
      "account_id":"{ACCOUNT ID}",
      "location": {"latitude":"0.351615","longitude":"32.597892"}
    }
}

OlyBoss Pop Details

 

Parameter Type
DESCRIPTION
boss_account_id required The ID of the OlyBoss user account.
my_location required The associative array with the latitude and longitude of user's current location.

 

OlyBoss Pop Details

/locations/user_details (GET)

Send

curl -X GET https://api.olycash.com/v1/locations/user_details
  -d boss_account_id = {OLYBOSS ACCOUNT ID}
  -d my_location = {
            "latitude":"1256", 
            "longitude":"5689"
           } 

Recieve (SUCCESS)

http code 200
{
      "s3_photo_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e37.jpg",
      "photo_type": "potrait",
      "distance_from_shopper": "120",
      "address": "230 Wilston Street, Kampala, Uganda. ZipCode 256",
      "open_times": "9am to 5pm Weekdays, 10am to 2pm Weekends",
      "rates": "5% Cashout, 15% Debit code"
}

Directions to OlyBoss Near Me

Parameter Type
DESCRIPTION
start_location  required The associative array with the latitude and longitude of the start location.
end_location  required The associative array with the latitude and longitude of the end location.
travel_mode  required The travel mode of the directions to be returned. Possible values are walking, driving.
 

Directions to OlyBoss Near Me

/locations/directions (GET)

Send

curl -X GET https://api.olycash.com/v1/locations/directions
  -d start_location = {
              "latitude":"256325", 
              "longitude":"13526"
             }
  -d end_location = {
              "latitude":"25489", 
              "longitude":"266488"
            }
  -d travel_mode = "walking"

Recieve (SUCCESS)

[
google route array format as shown here: https://developers.google.com/maps/documentation/directions/intro
]

Codes

List of Codes

 

Parameter Type
DESCRIPTION
account_id required The ID of the user account.
code_type optional The type of codes desired. Possible values are debit, credit. Default is debit.
code_status optional
The status of the codes desired. Possible values are
DEBIT: issued, merged, used, cashedout, archived. Default is issued.
CREDIT: issued, funded, cancelled, refunded, archived. Default is issued.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
Notes:
issued_by detail is not returned for a code if the requester account_id and the code owner’s account_id are different. If different return the issued_to details instead
By default, if code_type is not specified, the last 10 “debit,credit” codes are returned.
By default only codes with code_status=issued are returned.

List of Codes

/codes/list (GET)

Send

curl -X GET https://api.olycash.com/v1/codes/list
  -d account_id = {ACCOUNT ID}
  -d code_type = "debit"
  -d code_status = "issued"
  -d limit = "20"
  -d offset = "5"
  

Recieve (SUCCESS)

http code 200
{
  "data":[
    {
      "code": "G5F-457-4EB-B98", 
      "code_type": "debit", 
      "issued_by":{
        "name": "John Doe",
        "s3_photo_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e31.jpg"
       }, 
      "expires": "{EXPIRY DATE}", 
      "code_s3_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/code-G5F4574EBB98.jpg", 
      "status": "issued", 
      "original_amount":{
        "amount":"450000.00",
        "currency_code":"UGX"
       }, 
      "balance":{
        "amount":"427000.00",
        "currency_code":"UGX"
       }, 
      "date_generated":"1480723250", 
      "issued_to":{
        "name":"Brian Serumaga",
        "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57e3166caeda7a6635df6066.jpg",
        "user_id":"57e3166caeda7a6635df6066"
       }
    },
    {
      "code":"TRK-457-400-B95", 
      "code_type":"debit", 
      "issued_by":{
        "name":"John Doe",
        "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e31.jpg"
       }, 
      "expires":"{EXPIRY DATE}", 
      "code_s3_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/code-TRK457400B95.jpg", 
      "status":"cashedout", 
      "original_amount":{
        "amount":"100000.00",
        "currency_code":"UGX"
       }, 
      "balance":{
        "amount":"0.00",
        "currency_code":"UGX"
       }, 
      "date_generated":"1480726651", 
      "issued_to":{
        "name":"Brian Serumaga",
        "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57e3166caeda7a6635df6066.jpg",
        "user_id":"57e3166caeda7a6635df6066"
       }
    },
    {
      "code":"W70-UU4-112-M52", 
      "code_type":"debit", 
      "issued_by":{
        "name":"John Doe",
        "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e31.jpg"
       }, 
      "expires":"{EXPIRY DATE}", 
      "code_s3_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/code-W70UU4112M52.jpg", 
      "status":"issued", 
      "original_amount":{
        "amount":"450000.00",
        "currency_code":"UGX"
       }, 
      "balance":{
        "amount":"427000.00",
        "currency_code":"UGX"
       },
      "date_generated":"1480729064",
      "issued_to":{
        "name":"Brian Serumaga",
        "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57e3166caeda7a6635df6066.jpg",
        "user_id":"57e3166caeda7a6635df6066"
       }
    }
  ],
"count":3
 }

Code Details

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
code required The code value.
Notes:
Issued By detail is not returned for a code if the requester account_id and the code owner’s account_id are different.

Code Details

/codes/details (GET)

Send

curl -X GET https://api.olycash.com/v1/codes/details
  -d account_id = {ACCOUNT ID}
  -d code = "G5F-457-4EB-B98"
  

Recieve (SUCCESS)

http code 200
{
  "code": "G5F-457-4EB-B98",
  "code_type": "debit",
  "status":"inactive",
  "issued_by": {
    "name":"John Doe",
    "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e31.jpg"
   },
  "expires":"{EXPIRY DATE}",
  "code_s3_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/code-G5F4574EBB98.jpg",
  "original_amount":{
    "amount":"450000.00",
    "currency_code":"UGX"
   },
  "balance":{
    "amount":"427000.00",
    "currency_code":"UGX"
   },
  "date_generated":1480723250,
  "issued_to": {
    "name":"Brian Serumaga",
    "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user 57e3166caeda7a6635df6066.jpg",
    "user_id":"57e3166caeda7a6635df6066"
   },
  "history": [
    {
      "date":1480724294,
      "action":"merged",
      "replacement_code":"57F-457-4EB-BD6"
    },
    {
      "date":1480723266,
      "action":"used",
      "used_amount":{
        "amount":23000,
        "currency_code":"UGX"
       }
    },
    {
      "date":1480723250,
      "action":"generated"
    }
   ]
}

Merge Codes

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
codes required The array of codes to be merged.

 

Merge Codes

/codes/merge (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/merge 
  -d account_id = {ACCOUNT ID}
  -d codes = "W70-UU4-112-M52,TRK-457-400-B95,G5F-457-4EB-B98"
 

Recieve (SUCCESS)

http code 200
{
      "new_replacement_code": "57F-457-4EB-BD6",
      "code_amount": {
            "amount":1430000,
            "currency_code":"UGX"
           }
  }

Cash-out Code

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
pin required The encrypted value of the pin of the boss who is authorizing the transaction.
code required The code value to cash-out.
Notes:
You can only cash-out one debit code at a time.

 

Cash-out Code

/codes/cashout (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/cashout
  -d account_id = {ACCOUNT ID}
  -d pin = {PIN}
  -d code = "W70-UU4-112-M52"

Recieve (SUCCESS)

http code 200
{
      "new_boss_balance":{
                "amount":456000,
                "currency_code":"UGX"
              }
  }

Fund Code

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
pin required The pin of the boss who is authorizing the transaction.
funding_method required The method of funding to use (balance/code).
code required The code to fund.
funding_code required The debit-code used to fund the credit code (if the method is code)
Notes:
Only one funding method can be used at a time on a credit code.

 

Fund Code

/codes/fund (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/fund
  -d account_id = {ACCOUNT ID}
  -d pin = {PIN}
  -d funding_method = "code"
  -d code = "W70-UU4-112-M52"
  -d funding_code = "TRK-457-400-B95"

Recieve (SUCCESS)

http code 200
{
      "new_boss_balance": {
                "amount":956000,
                "currency_code":"UGX"
               }
  }

Cancel Code

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
codes required The array of codes to cancel.
Notes:
Only Credit code can be cancelled. The issuer of the code is notified through email by the system. A debit code is cancelled by Cashout.

 

Cancel Code

/codes/cancel (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/cancel
  -d account_id = {ACCOUNT ID}
  -d codes = "W70-UU4-112-M52,TRK-457-400-B95,W70-UU4-112-M52"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

Send Code

 

Parameter Type
DESCRIPTION
account_id required The ID of the account (OlyBoss).
shopper_account_id required The ID of the shopper account to whom the code is to be sent.
pin required
The pin of the boss who is authorizing the transaction.
send_amount required The amount to send to the shopper [amount, currency_code] e.g, ['345000.00', 'UGX'].

 

Send Code

/codes/send (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/send
  -d account_id = {ACCOUNT ID}
  -d shopper_account_id = {SHOPPER ACCOUNT ID}
  -d pin = {BOSS ACCOUNT PIN}
  -d send_amount = {
           "amount":"100000",
           "currency_code":"UGX"
          }
  

Recieve (SUCCESS)

http code 200
{
      "message":"OK",
      "amount_sent": {
        "amount":100000,
        "currency_code":"UGX"
       },
      "new_balance": {
        "amount":856000,
        "currency_code":"UGX"
       }
  }

Request for Credit Code

 

Parameter Type
DESCRIPTION
seller_account_id required The ID of the account (OlyBoss).
shopper_contact required
The contact details of the shopper who is requesting a credit code [email_address, telephone]
shopper_account_id required The ID of the shopper account to whom the code is to be sent.
item_description required
The description of the item. [sku, name, note, shipping, insurance, item_url, item_image] e.g.,
[‘409831’,’GAP Flower-embellished tee’, ‘Designed exclusively for Factory
Stores. Soft slub jersey. Short cuffed sleeves. Round neckline. Floral applique at
front.’, ‘45000.00’, ‘http://www.gapfactory.com/browse/product.do?
pid=409831031&cvosrc=cse.Google.PLA&cvo_crid=%7Bcreative
%7D&Matchtype=%7Bmatchtype%7D&campaigntype=%7B_cvocampaignvalue
%7D&CAWELAID=120296850000008237&cvosrc=ppc.google.PLA_Brand&cvo
_campaign=743497664&cvo_adgroup=42895038870&cvo_crid=174850281974&
Matchtype=&tid=gppl000001&kwid=1&ap=7’, ‘Y787435345H78DR89.jpg’]
total_cost required The amount of the code to be generated [amount, currency_code] e.g, ['345000.00', 'UGX'].

Note: total_cost – includes item cost and shipping.
 

Request for Credit Code

/codes/credit (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/credit
  -d seller_account_id = {SELLER ACCOUNT ID}
  -d shopper_contact = "jadoe@gmail.com"
  -d shopper_account_id = {SHOPPER ACCOUNT ID}
  -d item_description = {"name":"Bananas","note":"Clusters of ripe yellow bananas Bogota straight and fresh","sku":"Pieces","shipping":{"currency":"USD","value":"0.72"},"item_url":"https:\/\/s3-us-west-1.amazonaws.com\/olycash-files-b1\/1505994868310.jpg","item_image":"1505994868310.jpg","price":{"currency":"USD","value":"72.24"}
  -d total_cost = {
           "amount":"100000",
           "currency_code":"UGX"
          }

Recieve (SUCCESS)

http code 200
{
      "credit_code":"G5F-457-4EB-082",
      "expiry_date": "1480721670",
      "balance": {
        "amount":900000.00,
        "currency_code":"UGX"
       }
  }

Share Credit Code

 

Parameter Type
DESCRIPTION
code required The credit code value.

email 

OR

telephone

required

The email to send the code to.

OR

The telephone to send the code to.

 

Share Credit Code

/codes/share_credit_code (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/share_credit_code
  -d code = "G5F-457-4EB-B98"
  -d email = "jdoe@email.com"
     OR
  -d telephone = "256774780435"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

Confirm Usage of Debit Code 

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
code required The ID of the shopper account to whom the code is to be sent.
total_cost required The cost of the code [amount, currency_code] e.g, ['345000.00', 'UGX'].
item_description required The description of the item. [sku, name, note, shipping, insurance, item_url, item_image]

Note: At least the item_description{ name } is required. Provide sku to avoid possible duplication of items in the database.

Option values for will_pickup, pickup_only are Y or N (or not submitted if not needed). Default seller pickup address is used if no address is provided when any of the above values are set to Y.

 

Confirm Usage of Debit Code 

/codes/debit (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/debit
  -d account_id = {ACCOUNT ID}
  -d code = "G5F-457-4EB-B98"
  -d total_cost = {
           "amount":"300000.00",
           "currency_code":"UGX"
          }

Recieve (SUCCESS)

http code 200
{
      "message": "OK",
      "new_balance": {
        "amount":345000,
        "currency_code":"UGX"
       }
  }

Forward Selected Codes

 

Parameter Type
DESCRIPTION
account_id required The ID of the account (OlyBoss).
codes[] required An array of codes to be forwarded.
method required The method used to the send the code.

 

Forward Selected Codes

/codes/credit (POST)

Send

curl -X POST https://api.olycash.com/v1/codes/forward
  -d account_id = {SELLER ACCOUNT ID}
  -d codes = {"059-4A7-055-J6G","059-6F7-E1D-XGB","059-7EF-297-B7K","059-8B1-3E0-XIK","059-8C7-13C-KRV"}
  -d method = "email"

Recieve (SUCCESS)

http code 200
{
      "sent_count":5,
      "failed_count": 0,
      "details": {
        "059-4A7-055-J6G":"yes",
        "059-6F7-E1D-XGB":"yes",
        "059-7EF-297-B7K":"yes",
        "059-8B1-3E0-XIK":"yes",
        "059-8C7-13C-KRV":"yes"
       }
  }

Transactions

Transactions List

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
phrase optional The phrase to search through a list.
transaction_type optional The type of transactions to be returned in the list. Possible values are: shopper_transactions, earnings, credit_code_issues, debit_transaction_issues, code_funding. Default is shopper_transactions.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
Notes:
The transaction type can be: shopper_transactions, earnings, credit_code_issues, debit_code_issues, code_funding, or a combination of the above.

 

Transactions List

/transactions/list (GET)

Send

curl -X GET https://api.olycash.com/v1/transactions/list
  -d account_id = {ACCOUNT ID}
  -d phrase = "Completed transaction"
  -d limit = "20"
  -d offset = "5"
  -d transaction_type = "shopper_transactions"

Recieve (SUCCESS)

http code 200
{
  "count": "3",
  "range": "0-3",
  "query_id": "31iny-34589345-asdfjk-250j",
  "data":[
    {
      "date": "1480724299",
      "status": "completed",
      "details": "eBay.com, Item #789273478, Plain Whilte Headphone Jack",
      "type": "purchase",
      "code": "G5F-457-4EB-B98",
      "fee":{
        "amount":1,
        "currency":"USD"
       },
      "transaction_amount":{
        "amount":23000,
        "currency":"UGX",
        "rate":3458
       }
    },
    {
      "date": 1480724080,
      "status": "pending",
      "details": "alibaba.com, Flexible Clothes - 2 Tonnes plus shipping",
      "type": "purchase",
      "code": "X5F-051-4EB-F0H",
      "fee":{
        "amount":134,
        "currency":"USD"
       },
      "transaction_amount": {
        "amount":5045,
        "currency":"USD",
        "rate":1
       }
    },
    {
      "date": "1480721220",
      "status": "cancelled",
      "details": "Attempted at OlyBoss #67e3166caeda4a6635df60960",
      "type": "fundcreditcode",
      "code": "G5F-457-4EB-082",
      "fee":{
        "amount":5,
        "currency":"USD"
       },
      "transaction_amount":{
        "amount":480200,
        "currency":"UGX",
        "rate":3457.5
       }
    }
  ]
} 

Email Transactions List

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
query_id required The ID string of the query whose result will be sent to the registered email address.

 

Email Transactions List

/transactions/send (POST)

Send

curl -X POST https://api.olycash.com/v1/transactions/send
  -d account_id = {ACCOUNT ID}
  -d query_id = "31iny-34589345-asdfjk-250j"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

Refund Payment by code

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
transaction_id required The ID of the transaction whose payment is to be refunded.

 

Refund Payment by code

/transactions/refund (POST)

Send

curl -X POST https://api.olycash.com/v1/transactions/refund
  -d account_id = {ACCOUNT ID}
  -d transaction_id = "468798484894khghgh"

Recieve (SUCCESS)

http code 200
{
    "message":"OK",
    "new_balance":{ 
      "amount":"549000.00", 
      "currency_code":"UGX" 
    }
}

List Business Categories

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
phrase optional

The phrase to search through the list of level_1 and level_2 category names.

level_1_category optional Search through the level_2 categories under this given level_1_category.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
ignore_category_ids optional The comma delimited list of category IDs to ignore in the search and the list being returned.
Notes:
The variable ignore_category_ids is the comma delimited list of category IDs not to include in the next result list.

 

List Business Categories

/transactions/list_categories (GET)

Send

curl -X GET https://api.olycash.com/v1/transactions/list_categories
  -d account_id = "{ACCOUNT ID}"
  -d phrase = "vehicle"
  -d limit = "6"
  -d offset = "1"
  -d level_1_category = "auto"
  -d ignore_category_ids = "test id"

Recieve (SUCCESS)

http code 200
{
 "count": "6"
 "data": [
   {
     "id":"534234",
     "level_1_name": "auto",
     "level_2_name":"repair",
  },
   {
     "id":"534214",
     "level_1_name":"auto",
     "level_2_name":"wash",
  },
   {
     "id":"534236",
     "level_1_name":"auto",
     "level_2_name":"car parts",
  },
   {
     "id":"537720",
     "level_1_name":"retail",
     "level_2_name":"vehicle accessories",
  },
   {
     "id":"507899",
     "level_1_name":"finance",
     "level_2_name":"auto loans",
 },
   {
     "id":"134754",
     "level_1_name":"non profit",
     "level_2_name":"affiliated",
  }
 ]
}

Files

Upload a file(photo, PDF, etc)

 

Parameter Type
DESCRIPTION
file required The file object to be uploaded. The file (object) should at least have the properties {tmp_name, name, size}
Notes:
This version will be upgraded to allow multi-file uploads at the same time.

 

Upload a file(photo, PDF, etc)

/files/upload (POST)

Send

curl -X POST https://api.olycash.com/v1/files/upload
  -d file (object) = {tmp_name, name, size}

Recieve (SUCCESS)

http code 200
{
      "s3_url"
  }

Money

Fund Account

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user to which the funds will be posted.
add_amount
required
 The amount to add to the account
method required The method used to add the money. Possible values: cash, paypal, card, eft, mobile_money
method_details{ } required
The details of the method being used to add the money.
*cash {bank_id, receipt_number, deposit_date}
*paypal {paypal_email}
*card {name_on_card, number, expiry, cvv, email_address, telephone, billing_address}
*mobile_money {mobile_money_ref_number}
*eft {bank_id, remitting_ac_identifier, routing_or_swift}
keep_details required Whether to keep the passed payment details or not. Possible values: yes, no
Notes:
OK for PayPal means redirect to PayPal interface for verification and include the callback_url as the starting point when control is returned to the app. The callback URL only accepts posts from PayPal server.
Use the same approach for callback url for a credit card payment provider(authorize.net)

 

Fund Account

/money/add (POST)

Send

curl -X POST https://api.olycash.com/v1/money/add
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d add_amount = {"amount":"235000.00","currency_code":"UGX"}
  -d keep_details = "yes/no"
  -d method = "cash"
  -d method_details = {
            "receipt_number":"31iny-34589345-asdfjk-250j",
            "bank_id":"26552",
            "deposit_date":"1480723207"
           }

Recieve (SUCCESS)

http code 200
{
      "message":"OK",
      "callback_url": "https:\/\/api.olycash.com\/v1\/money\/add\/callback\/57e3166caeda7a6635df6066"
  }

Account Balance 

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user.
Notes:
Store currency is the default currency set in the settings page. If the user changes this currency, their available balance is changed to this currency at the current OlyCash exchange rate and the new currency is used through out the system going forward. It does not affect previously executed transactions.

Account Balance 

/money/balance (GET)

Send

curl -X GET https://api.olycash.com/v1/money/balance
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}

Recieve (SUCCESS)

http code 200
{
      "read_date": "1480724299",
      "available": {
        "amount":"7900000.00",
        "currency_code":"UGX"
       },
      "pending": {
        "amount":"235000.00",
        "currency_code":"UGX"
       },
      "exchange_rate": {
        "store_currency":"USD",
        "display_currency":"UGX"
        "store_currency_rate":"1.00",
        "display_currency_rate":"3566.83"
       },
 }

Verify Money Received

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user.
posting_id required  
amount_verified{} required The amount verified for this account [amount, currency_code] e.g, ['345000.00', 'UGX']
verified_by_admin_id required The ID of the admin user who has verified this amount.
notes optional Any notes about this transaction.
action optional
The verification action to be taken. Possible values for action are: verified, reversed, deleted If not specified, it is
assumed that action is verified
verifier_ip_address required The IP address that the admin used when verifying this amount.
Notes: The posting_id is automatically picked from the list of deposit postings displayed in the admin panel.
Possible values for action are: verified, reversed, deleted If not specified, it is assumed that action is verified

Verify Money Received

/money/verify (POST)

Send

curl -X POST https://api.olycash.com/v1/money/verify
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d posting_id = ""
  -d amount_verified = {
              "amount":"345000", 
              "currency_code":"UGX"
             }
  -d verified_by_admin_id = "31iny-34589345-asdfjk-250j"
  -d notes = "Money for buying a laptop"
  -d verifier_ip_address = "192.168.1.1"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

View Deposit Postings

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
status[]
optional The deposit status. Possible values: pending, confirmed, verified, reversed, deleted. Default list is: pending, confirmed, verified
phrase optional The phrase to search through a list.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
Notes:
Possible values of status: pending, confirmed, verified, reversed, deleted. Default list is: pending, confirmed, verified

 

View Deposite Postings

/money/deposits (GET)

Send

curl -X POST https://api.olycash.com/v1/money/deposits
  -d account_id = {ACCOUNT ID}
  -d status = {"pending"}
  

Recieve (SUCCESS)

http code 200
{
      "posting_id":"OK",
      "status":"pending",
      "method":"mobile_money",
      "notes":"mobile_money",
      "verified_at_ip":"",
      "keep_details":"yes",
      "date_entered":"1502385508",
      "date_updated":"1502385508",
      "original_amount": {
        "amount":60000,
        "currency_code":"UGX"
       },
      "final_amount": {
        "amount":17.337032318115234,
        "currency_code":"USD"
       }
       "owner": {
        "account_id":"{ACCOUNT ID}",
        "name":"Samuel Muwakanya"
       },
      "verified_by_admin": {
        "account_id":"",
        "name":""
       }
       "updated_by": {
        "account_id":"{ACCOUNT ID}",
        "name":"Samuel Muwakanya"
       }
  }

View Exchange Rates

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user.
currency_list required The comma delimited list of desired currency codes e.g., “usd,ugx,cny”.
Notes:
An optional currency list can specify exactly which currencies should be returned in the list. It is sent in form of a comma delimited list of currency codes e.g, “usd,gbp,cny” The exchange amount is always in UGX for MVP.
By default, all are returned (which is slower).

 

View Exchange Rates

/money/exchange_rates (GET)

Send

curl -X POST https://api.olycash.com/v1/money/exchange_rates
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d currency_list = "usd,gbp,cny"

Recieve (SUCCESS)

http code 200
{
  "store_currency_rate":{
    "count": "4",
    "data":[
      {
        "currency_code": "usd",
        "currency_name": "United States Dollar",
        "exchange_amount": "3611.93",
        "last_update": "1480724299"
      },
      {
        "currency_code": "gbp",
        "currency_name": "British Pound",
        "exchange_amount": "4430.52",
        "last_update": "1480724296"
      },
      {
        "currency_code": "cny",
        "currency_name": "Chinese Yuan",
        "exchange_amount": "519.38",
        "last_update": "1480724293"
      },
      {
        "currency_code": "kes",
        "currency_name": "Kenyan Shilling",
        "exchange_amount": "35.25",
        "last_update": "1480724293"
       }
     ]
  }

Withdraw Funds

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user submitting the withdrawal request.
method required The method used to withdraw the money. Possible values: cash, paypal, card, eft, mobile_money.
method_details{} required

The details of the method being used to withdraw the money.

*cash {bank_id, receipt_number, deposit_date}
*paypal {paypal_email}
*card {name_on_card, number, expiry, cvv, email_address, telephone, billing_address}
*mobile_money {mobile_money_ref_number}
*eft {bank_id, remitting_ac_identifier, routing_or_swift}
keep_details required Whether to keep the passed payment details or not. Possible values: yes, no
withdraw_amount required The amount to withdraw from the account.
posted_by optional The ID of the account holder who posted the request.
method_account_id required The ID of the account being updated.

 

Withdraw Funds

/money/withdraw (POST)

Send

curl -X POST https://api.olycash.com/v1//money/withdraw
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d withdraw_amount = {"amount":"200000", "currency":"UGX"}
  -d keep_details = "yes/no"
  -d method = "cash, paypal, card, eft, mobile_money"
  -d method_details = {
            "receipt_number":"31iny-34589345-asdfjk-250j",
            "bank_id":"26552",
            "deposit_date":"1480723207"
           }

            OR {
            "paypal_email":"jdoe@email.com"
           }

           OR{
            "mobile_money_ref_number":"256774780435"
           }

           OR{
            "name_on_card":"John Doe",
            "number":"AC1-36D-638-E37",
            "expiry":"1480723205"
            "cvv":""
            "email_address":"jdoe@email.com"
            "telephone":"256774780435"
            "billing_address":""
           }

           OR{
            "bank_id":"26552",
            "remitting_ac_identifier":"1480723207"
            "routing_or_swift":"2334344"
           }

Recieve (SUCCESS)

http code 200
{
  OK,
  [callback_url:https://api.olycash.com/v1/w/(encrypted value)/(account_id)]
  }

View Financial Accounts

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user whose details are being requested.
method required
The method whose accounts need to be viewed. Possible values: cash, paypal, card, eft, mobile_money
Notes:
Only the needed third_party_value is filled. e.g., third_party_value_1 = mobile_number FOR mobile-money method and third_party_value_1 = bank-account, third_party_value_2 = bank name.

 

View Financial Accounts

/money/accounts (GET)

Send

curl -X POST https://api.olycash.com/v1/money/accounts
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d method = "cash, paypal, card, eft, mobile_money"

Recieve (SUCCESS)

http code 200
{
    "count": "3",
    "data":[
        "id": "AC1-36D-638-E37",
        "owner_name": "John Doe",
        "third_party_value_1": {mobile_number},
        "third_party_value_2": {bank-account}
        "third_party_value_3": {bank name},
        "is_preferred": ""
     ],
     ..
  }

Update Financial Account

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user whose account details are being updated.
method required The method used with the account. Possible values: cash, paypal, card, eft, mobile_money
method_details{} required

The details of the account being changed for that method.

*cash {bank_id, receipt_number, deposit_date}
*paypal {paypal_email}
*card {name_on_card, number, expiry, cvv, email_address, telephone, billing_address}
*mobile_money {mobile_money_ref_number}
*eft {bank_id, remitting_ac_identifier, routing_or_swift}

Notes:

A new account is only created under a method when the account is going to be used and keep_details is set to yes. E.g. ,
/account/withdraw 
or
/money/add
This method requires the method_account_id which is for an existing account.

 

Update Financial Account

/money/account (POST)

Send

curl -X POST https://api.olycash.com/v1/money/account
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d withdraw_amount = {"amount":"20000", currency}
  -d method_account_id = "yes/no"
  -d method = "cash, paypal, card, eft, mobile_money"
  -d method_details = {
            "receipt_number":"31iny-34589345-asdfjk-250j",
            "bank_id":"26552",
            "deposit_date":"1480723207"
           }

            OR {
            "paypal_email":"jdoe@email.com"
           }

           OR{
            "mobile_money_ref_number":"256774780435"
           }

           OR{
            "name_on_card":"31iny-34589345-asdfjk-250j",
            "number":"256774780435",
            "expiry":"1480724293"
            "cvv":""
            "email_address":"jdoe@email.com"
            "telephone":"256774780435"
            "billing_address":""
           }

           OR{
            "bank_id":"26552",
            "remitting_ac_identifier":"1480723207"
            "routing_or_swift":""
           }

Recieve (SUCCESS)

http code 200
{
  OK
  }

Remove Financial Account

 

Parameter Type
DESCRIPTION
olyboss_account_id required The account ID of the user whose account details are being updated.
method_account_id required The ID of the account being updated.
Notes:
The method_account is not removed from the system and used for previously scheduled transactions or for auditing purposes but is no longer accessible to a user in the system.

 

Remove Financial Account

/money/deactivate_account (POST)

Send

curl -X POST https://api.olycash.com/v1//money/deactivate_account
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d method_account_id = ""

Recieve (SUCCESS)

http code 200
{
  "OK"
  }

View Deposit Details

 

Parameter Type
DESCRIPTION
account_id required The account ID of the user accessing the details.
record_id
required The record ID whose details are to be viewed.
record_type required The type of record (deposit or withdrawal) for the above record ID.
Notes: The options for record_type are deposit, withdrawal

 

View Deposite Details

/money/details (GET)

Send

curl -X POST https://api.olycash.com/v1/money/details
  -d account_id = {ACCOUNT ID}
  -d record_id = {RECORD ID}
  -d record_type = "deposit"
  

Recieve (SUCCESS)

http code 200
{
      "posting_id":"OK",
      "status":"pending",
      "method":"mobile_money",
      "notes":"mobile_money",
      "verified_at_ip":"",
      "keep_details":"yes",
      "date_entered":"1502385508",
      "date_updated":"1502385508",
      "original_amount": {
        "amount":60000,
        "currency_code":"UGX"
       },
      "final_amount": {
        "amount":17.337032318115234,
        "currency_code":"USD"
       }
       "owner": {
        "account_id":"YC0000000033",
        "name":"Samuel Muwakanya"
       },
      "verified_by_admin": {
        "account_id":"",
        "name":""
       }
       "updated_by": {
        "account_id":"YC0000000033",
        "name":"Samuel Muwakanya"
       }
  }

Update Withdrawal Transfer Status

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
withdrawal_id
required The ID of the withdrawal record.
status required The new withdrawal status.
ip_address required The IP Address of the user making the change.
location optional The associative array with the latitude, longitude and other location details of user's current location.
Notes: Optional values for status are approved, complete, stopped

 

Update Withdrawal Transfer Status

/money/transfer (GET)

Send

curl -X POST https://api.olycash.com/v1/money/transfer
  -d account_id = {ACCOUNT ID}
  -d withdrawal_id = {WITHDRAW RECORD ID}
  -d status = "approved"
  -d ip_address = "192.168.1.3339"
  
  

Recieve (SUCCESS)

http code 200
{
      "message":"OK"
  }

View Withdraw Postings

 

Parameter Type
DESCRIPTION
account_id required The ID of the user account updating the status.
start_date
optional The start date of the withdrawal records.
end_date optional The end date of the withdrawal records.
phrase optional The phrase to search through a list.
limit optional TThe limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
 

 

View Withdraw Postings

/money/withdrawals (GET)

Send

curl -X POST https://api.olycash.com/v1/money/withdrawals
  -d account_id = {ACCOUNT ID}
  

Recieve (SUCCESS)

http code 200
{
    "count":"10",
    "data":[{
      "withdrawal_id":"25",
      "request_date":"1502532616",
      "completion_date":"0.000000",
      "method":"mobile_money",
      "withdrawal_submitted":{"amount":"238850","currency":"UGX"},
      "withdrawal_approved":{"amount":"69.01583099365234","currency":"USD"},
      "requester":{"user_id":"82","first_name":"Eisah","last_name":""},
      "status":"pending"
  }

Customers

Customer Lookup

 

Parameter Type
DESCRIPTION
account_id required The ID of the OlyBoss account

customer_email

OR

customer_mobile

required

The customer whose email is given.

OR

The customer whose phone is given.

 

Customer Lookup

/customers/search (GET)

Send

curl -X GET https://api.olycash.com/v1/customers/search
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d customer_email = "jdoe@email.com"
     OR 
  -d customer_mobile = "14502304589"

Recieve (SUCCESS)

http code 200
{
      "user_id": "57f4574ebbd6ac136d638e31",
      "name": "John Doe",
      "email_address": "jdoe@email.com",
      "mobile_number": "14502304589",
      "s3_photo_url":"https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e31.jpg"
  }

Previous Customers

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
phrase optional The phrase to search through a list.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
Notes:
phrase – searches shopper name
 

Previous Customers

/customers/list (GET)

Send

curl -X GET https://api.olycash.com/v1/customers/list
  -d olyboss_account_id = {OLYBOSS ACCOUNT ID}
  -d phrase = "John"
  -d limit = "5"
  -d offset = "20"

Recieve (SUCCESS)

http code 200
[
  {
    "account_id": "{ACCOUNT ID}",
    "user_id":"AC1-36D-638-E31",
    "name":"John Doe",
    "s3_photo_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e31.jpg",
    "last_transaction_date": "1480723250"
  },
  {
    "account_id":"{ACCOUNT ID}",
    "user_id": "AC1-36D-639-E31",
    "name":"Jack Doe",
    "s3_photo_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d639e31.jpg",
    "last_transaction_date": "1480723207"
  },
  {
    "account_id":"{ACCOUNT ID}",
    "user_id": "AC1-36D-638-E37",
    "name":"Yeky Dane",
    "s3_photo_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e37.jpg",
    "last_transaction_date": "1480723205"
  }
]

Messages

Send a Message To Customer Support

 

Parameter Type
DESCRIPTION
boss_account_id required The account ID of the user.
subject required The subject of the message to send.
details required The details of the message.
customer_account_id optional The ID of the customer who is sending the message.

 

Send a Message To Customer Support

/messages/send (POST)

Send

curl -X POST https://api.olycash.com/v1/messages/send
  -d boss_account_id = {BOSS ACCOUNT ID}
  -d subject = "Fund account"
  -d details = "I would like to fund my account"
  -d customer_account_id = "AC1-36D-638-E37"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

View Answer List

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
category_id optional

The ID of the category whose answers are to be returned.

phrase optional The phrase to search through a list.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
Notes:
If no category_id is specified, any category answer with the matching phrase will be returned.

 

View Answer List

/messages/answers (GET)

Send

curl -X GET https://api.olycash.com/v1/messages/answers
  -d account_id = "boss"
  -d category_id = "2"
  -d phrase = "Bank Account"
  -d limit = "5"
  -d offset = "3"

Recieve (SUCCESS)

http code 200
{
  "count":5,
  "data": [
    {
      "id": "23423",
      "category_id": "2",
      "subject": "How Do I Change My PIN?",   
      "details": "Go to the top left of the screen display and click on the menu. Click the settings link to view the Change PIN and confirm with a new desired 4-digit PIN and you are good to go.",
      "date": "1480724299"
    },
    {
      "id": "23008",
      "category_id": "3",
      "subject": "How Do I Recover My Password?",
      "details": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been                                                           
the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled a type specimen book.",
      "date":  "1480724460"
    },
    {
      "id": "11427",
      "category_id": "2",
      "subject": "How Long Does It Take to Get My Cash In Bank Account?",
      "details": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled a type specimen book.",
      "date": "1480725600"
    },
    {
      "id": "80823",
      "category_id": "3",
      "subject": "What Are The Fees For The Code?",
      "details": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been 
the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled a type specimen book.",
      "date": "1480724400"
    },
    {
      "id": "33021",
      "category_id": "1",
      "subject": "Where is the Nearest OlyBoss?",
      "details": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been 
the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled a type specimen book.",
      "date": "1480724209"
    }
  ]
 }

View Answer Categories List

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.

 

View Answer Categories List

/messages/answer_categories (GET)

Send

curl -X GET https://api.olycash.com/v1/messages/answer_categories
  -d account_id = "{ACCOUNT ID}"

Recieve (SUCCESS)

http code 200
{
  "count":"3",
  "data": [
    {
      "id": "1",
      "name": "OlyBoss"
    },
    {
      "id": "2",
      "name": "Security"
    },
    {
      "id": "3",
      "name": "Bank Transfers"
    },
  ]
 }

Plugins

Generate New Plugin 

Parameter Type
DESCRIPTION
name required The name of the plugin.
type required The type of the plugin widget.
width required The width of the widget.
height required The height of the widget.
return_type required The format of the return to be returned.
item_id optional The ID of the item being paid for if it is not a general payment button.
item_amount optional The amount of the item if this is not a general item amount.
behavior optional The behavior of the button when clicked on.
button_type optional
The type of the button (text, image_long or image_short).

Notes:

Type options: website, mobile, general, pay.
Behavior options: new_view, same_view.
Button_type options: text, image_long, image_short.
return_type options: email_response, plugin.
 
Using the value “max” for width or height allows flexible sizing to fit available space.
 
Review help about the fields used in the plugin here.

 

Generate New Plugin 

/plugins/generate (POST)

Send

curl -X POST https://api.olycash.com/v1/plugins/generate
  -d name = "John Doe"
  -d type = "mobile"
  -d width = "50px"
  -d height = "50px"
  -d return_type = "plugin"
  -d item_id = "AC1-36D-638-E49"
  -d item_amount = {
          "amount":"50000", 
          "currency":"UGX"
         }
  -d behavior = "new view"
  -d button_type = "image long"

Recieve (SUCCESS)

http code 200
{
   "plugin_id":"kq8923457l67638e31t788",
   "code":"<!-- Load OlyCash JavaScript SDK -->\n<script>(function(d, s, id) {\n var js, ojs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = "\/\/share.olycash.com\/en-us\/sdk.js";\n rjs.parentNode.insertBefore(js, rjs);\n}(document, 'script', 'olycash-js-sdk'));<\/script>\n\n\n<!-- Your share code -->\n<div class="image-long-button"\n style="width:100px !important; height:30px !important;"\n data-id="580955e6bbd6ac13d315fbe1">\n<\/div>"
}

Check if Plugin Name is available for user profile.

 

Parameter Type
DESCRIPTION
name required The name of the plugin.
seller_account_id required The ID of the seller account.
Notes:
Message options: taken, available

 

Check if Plugin Name is available for user profile

/plugins/check (GET)

Send

curl -X POST https://api.olycash.com/v1/plugins/check
  -d seller_account_id = {SELLER ACCOUNT ID}
  -d name = "John Doe"

Recieve (SUCCESS)

http code 200
{
      "message":"available"
 }

View Seller Plugins

Parameter Type
DESCRIPTION
seller_account_id required The ID of the seller account.
phrase optional The search phrase.
limit optional The limit.
offset optional The offset of the plugin list returned.
Notes:
Status options:active, inactive

 

View Seller Plugins

/plugins/list (GET)

Send

curl -X GET https://api.olycash.com/v1/plugins/list
  -d seller_account_id = {SELLER ACCOUNT ID}
  -d phrase = "View active seller plugins"
  -d limit = "5"
  -d offset = "20"

Recieve (SUCCESS)

http code 200
{
  "count":"2",
  "data":[
    {
      "plugin_id":"kq8923457l67638e31t788",
      "code":"<!-- Load OlyCash JavaScript SDK -->\n<script>(function(d, s, id) {\n var js, ojs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = "\/\/share.olycash.com\/en-us\/sdk.js";\n rjs.parentNode.insertBefore(js, rjs);\n}(document, 'script', 'olycash-js-sdk'));<\/script>\n\n\n<!-- Your share code -->\n<div class="image-long-button"\n style="width:100px !important; height:30px !important;"\n data-id="580955e6bbd6ac13d315fbe1">\n<\/div>",
      "date_generated":"1480723205",
      "status":"active"
    },
    {
      "plugin_id":"kq892345l6yy7775566007t",
      "code":"<!-- Load OlyCash JavaScript SDK -->\n<script>(function(d, s, id) {\n var js, ojs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = "\/\/share.olycash.com\/en-us\/sdk.js";\n rjs.parentNode.insertBefore(js, rjs);\n}(document, 'script', 'olycash-js-sdk'));<\/script>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n<!-- Your share code -->\n<div class="image-short-button"\n style="width:60px !important; height:25px !important;"\n data-id="580955e6bbd6ac13d317456jt">\n<\/div>",
      "date_generated":"1480723104",
      "status":"active"
     }
   ]        
  }

Delete Plugin

 

Parameter Type
DESCRIPTION
seller_account_id required The ID of the seller account.
plugin_id required The ID of the plugin to remove.
account_id required The account ID of the user.
 

 

Delete Plugin

/plugins/remove (POST)

Send

curl -X POST https://api.olycash.com/v1/plugins/remove
-d seller_account_id = {SELLER ACCOUNT ID}
-d plugin_id = {PLUGIN ID}
-d account_id = {ACCOUNT ID}

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

Email Plugin to Seller
 

Parameter Type
DESCRIPTION
account_id required The ID of this user account.
plugin_ids required The IDs of the plugins to be sent.

 

Email Plugin to Seller

/plugins/forward (POST)

Send

curl -X GET https://api.olycash.com/v1/plugins/forward
  -d account_id = {ACCOUNT ID}
  -d plugin_ids = {PLUGIN IDS}

Recieve (SUCCESS)

http code 200
{
  "count":"2",
  "data":[
    {
      "plugin_id":"kq8923457l67638e31t788",
      "code":"<!-- Load OlyCash JavaScript SDK -->\n<script>(function(d, s, id) {\n var js, ojs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = "\/\/share.olycash.com\/en-us\/sdk.js";\n rjs.parentNode.insertBefore(js, rjs);\n}(document, 'script', 'olycash-js-sdk'));<\/script>\n\n\n<!-- Your share code -->\n<div class="image-long-button"\n style="width:100px !important; height:30px !important;"\n data-id="580955e6bbd6ac13d315fbe1">\n<\/div>",
      "date_generated":"1480723205",
      "status":"active"
    },
    {
      "plugin_id":"kq892345l6yy7775566007t",
      "code":"<!-- Load OlyCash JavaScript SDK -->\n<script>(function(d, s, id) {\n var js, ojs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = "\/\/share.olycash.com\/en-us\/sdk.js";\n rjs.parentNode.insertBefore(js, rjs);\n}(document, 'script', 'olycash-js-sdk'));<\/script>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n<!-- Your share code -->\n<div class="image-short-button"\n style="width:60px !important; height:25px !important;"\n data-id="580955e6bbd6ac13d317456jt">\n<\/div>",
      "date_generated":"1480723104",
      "status":"active"
     }
   ]        
  }

View Plugin Details
 

Parameter Type
DESCRIPTION
account_id required The account ID of the user.
plugin_id required The ID of the plugin whose details are to be viewed.

 

View Plugin Details

/plugins/details (GET)

Send

curl -X GET https://api.olycash.com/v1/plugins/details
  -d account_id = {ACCOUNT ID}
  -d plugin_id = "kq8923457l67638e31t788"

Recieve (SUCCESS)

http code 200
{
    {
      "plugin_id":"kq8923457l67638e31t788",
      "name":"Iphone",
      "plugin_type":"type",
      "owner_account_id":{ACCOUNT OWNER ID},
      "owner_email":{ACCOUNT OWNER EMAIL},
      "behavior":"same_view",
      "item_id":"#895656",
      "item_price":{"amount":"2500","currency":"USD"},
      "button_type":"image_long",
      "width":"250",
      "height":"250",
      "date_created":"1497878632"
    }      
  }

Update Plugin Details
 

Parameter Type
DESCRIPTION
account_id required The account ID of the user.
plugin_id required The ID of the plugin whose details are to be updated.
plugin_type required The type of the plugin.
behavior optional The behavior of the button when clicked on.
item_id optional The ID of the item being paid for if it is not a general payment button.
item_amount optional The amount of the item if this is not a general/editable item amount.
item_amount_currency optional The currency of the amount for the item.
button_type required TThe type of the button (text, image_long or image_short). Default is image_long.
width required The width of the widget. Use "max" to flexible width to fit available space.
height required The height of the widget. Use "max" to flexible height to fit available space.

 

Update Plugin Details

/plugins/details (POST)

Send

curl -X POST https://api.olycash.com/v1/plugins/details
  -d account_id = {ACCOUNT ID}
  -d plugin_id = {PLUGIN ID}
  -d plugin_type = "Website"
  -d behavior = "same view"
  -d item_id = {ITEM ID}
  -d item_amount = "25000"
  -d item_amount_currency = "UGX"
  -d button_type = "text"
  -d width = "250"
  -d height = "250"
  

Recieve (SUCCESS)

http code 200
{
    "message":"OK"
  }

Items

Add Item Details

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
name
required
 The name of the item.
price required The price of the item.
currency_code required The currency code of the item.
url optional The URL of the online item location.
image required The S3 image URL of the featured image of the item.
description required The description of the item.
shipping optional The shipping cost of the item.
sku optional The Stock Keeping Unit of the item.
seller_id optional The ID of the seller if different from account ID.
is_featured optional Is this item featured?
stock optional The stock value of the item.
 

 

Add Item Details

/items/add (POST)

Send

curl -X POST https://api.olycash.com/v1/items/add
  -d account_id = {ACCOUNT ID}
  -d name = "lenovo Tablet"
  -d price = "235000.00"
  -d currency_code = "UGX"
  -d url = "http://lorempixel.com/400/500"
  -d image = "http://lorempixel.com/400/500"
  -d description = "1GB of RAM and 256 storage space and retina display"
  -d shipping = "25600"
  -d sku = "pieces"
  -d seller_id = "{Seller ACCOUNT ID}"
  -d is_featured = "yes"
  -d stock = "50"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

Edit Item Details

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
item_id required
The ID of the item to be updated.
name optional The name of the item.
price optional The price of the item.
currency_code optional The currency code of the item.
url optional The URL of the online item location.
image optional The S3 image URL of the featured image of the item.
description optional The description of the item.
shipping optional The shipping cost of the item.
sku optional The Stock Keeping Unit of the item.
seller_id optional The ID of the seller if different from account ID.
is_featured optional Is this item featured?
stock optional The stock value of the item.

 

Edit Item Details

/money/add (POST)

Send

curl -X POST https://api.olycash.com/v1/money/add
  -d account_id = {ACCOUNT ID}
  -d item_id = "40"
  -d name = "SAMSUNG COOKER"
  -d price = "5000"
  -d currency_code = "UGX"
  -d url = "http://www.samsung.com/uk/cooking-appliances"
  -d image = "http://lorempixel.com/400/500"
  -d description = "Precise and Flexible Cooking Appliances"
  -d shipping = "30"
  -d sku = "Pieces"
  -d seller_id = "{ACCOUNT ID}"
  -d is_featured = "Y"
  -d stock = "10"

Recieve (SUCCESS)

http code 200
{
      "OK"
  }

View Item List

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
phrase optional The phrase to search through a list.
limit optional  The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
seller_id optional The ID of the seller.
category optional The ID of the category.
location optional The location of the buyer {latitude, longitude}.
currency_code optional The currency code to use for display.
Notes:
Optional details of location {account_id, ip_address, city, state, zipcode, country, latitude, longitude, region_name, time_zone, metro_code}

 

View Item List

/items/list (GET)

Send

curl -X POST https://api.olycash.com/v1/items/list
  -d account_id = {ACCOUNT ID}
  -d phrase = "SAMSUNG"
  -d limit = "10"
  -d offset = "5"
  -d seller_id = "{Seller ACCOUNT ID}"
  -d category = "Machinery"
  -d location = "Kiwatule"
  -d currency_code = "UGX"

Recieve (SUCCESS)

http code 200
{
    "count": "5",
    "data":[
      {
        "item_id": "7",
        "name": "Clearing Water Bottle",
        "description": "This is a new Samsung Grand Prime",
        "sku": "YC0000000000-1497920392",
        "url": "https:\/\/www.jumia.ug\/samsung-grand-prime-plus-4g-lte-8gb-memory-1-5gb-ram-8mpx-camera-dual-sim-gold-1541471.html",
        "image": "https:\/\/olycash-files-b1.s3.amazonaws.com\/YC000004-1485979734.jpg",
        "price": {"currency":"USD","value":"13.00"},
        "shipping": {"currency":"USD","value":"0"},
        "seller_owner": "{seller_id}",
        "is_featured": "Y",
        "stock": "1",
        "date_created": "1497920392"
       ],
..
  }

Purchases

Add Purchase Details

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
item_id required The ID of the item.
quantity required The number of items bought.
quantity_label optional The label for the number of items.
price required The net price per item paid.
tax optional The tax of the item.
shipping optional The shipping cost of the item.
currency_code required The currency code of the item.
code required The code used
method optional The payment method used. Default is olycash. Only relevant for future compatibility.
method_type required The type of the method (other, debit, credit).
 

 

Add Purchase Details

/purchase/add (POST)

Send

curl -X POST https://api.olycash.com/v1/purchase/add
  -d account_id = {ACCOUNT ID}
  -d item_id = "40"
  -d quantity = "1"
  -d quantity_label = "Pieces"
  -d price = "50000"
  -d tax = "1200"
  -d shipping = "20"
  -d currency_code = "UGX"
  -d code = "059-446-126-0Y7"
  -d method = "olycash"
  -d method_type = "debit"

Recieve (SUCCESS)

http code 200
{
     "OK"
  }

View Purchase List

 

Parameter Type
DESCRIPTION
account_id required The ID of the account.
phrase
optional
The phrase to search through a list.
limit optional The limit of the number of results to return.
offset optional The number of results to skip before returning the [limit] results.
seller_id optional The ID of the seller.
category optional The ID of the category.
currency_code optional The display currency.

 

View Purchase List

/purchases/list (GET)

Send

curl -X POST https://api.olycash.com/v1/purchases/list
  -d account_id = {ACCOUNT ID}
  -d phrase = "Iphone 7"
  -d limit = "5"
  -d offset = "2"
  -d seller_id = "{SELLER ACCOUNT ID}"
  -d category = "Mobile Phones"
  -d location = "Kyaliwajala"
  -d currency_code = "UGX"

Recieve (SUCCESS)

http code 200
{
    "count": "3",
    "data":{[
        "purchase_id": "76",
        "item_id": "45",
        "item_name": "Iphone 7",
        "item_image": "http:\/\/lorempixel.com\/400\/500"
        "price": "0.16698451340198517",
        "tax": "0",
        "item_currency": "0",
        "status": "complete"
        "code_expiry": "1501334684",
        "code_type": "credit",
        "purchase_date": "1501161898"
     ],
     ..
     }
  }