Connecting to the API
All API calls will be made over a Secure Socket Layer (SSL) connection using the OAuth2 specification1.
https://api.olycash.com/v1/authorize
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. |
https://api.olycash.com/v1/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. |
https://api.olycash.com/v1/resource
REQUEST
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. |
https://api.olycash.com/v1/[part 1]/[part 2]?access_token=(access token)&[extra GET variables]
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
Sign up
Parameter | Type |
DESCRIPTION
|
---|---|---|
full_name | required | The name of the user. |
mobile_number OR email_address |
required |
The mobile phone number of the user. OR The email address of the user. |
password | required | The new user password. |
carrier_id | optional |
The ID of the phone carrier that the mobile number uses.
|
zipcode | optional |
The zipcode where the user registered from.
|
gender | optional | The gender of the user. |
birth_date | optional | The birthday of the user. |
oly_boss_id | optional |
The Oly Boss ID of the user who submits these details for registration.
|
photos[ ] | optional | The array of photos for this user in the format [s3_photo_url, type]. Possible values of “type”: id, portrait, other. |
Sign up
/account/signup (POST)
Send
curl -X POST https://api.olycash.com/v1/account/signup -d full_name = "John Doe" -d email_address = "jdoe@email.com" -d mobile_number = "256774780435" -d carrier_id = "908" -d password = {PASSWORD} -d photos =[ { "s3_photo_url":"https://olycash-files-b1.s3.amazonaws.com/7896234h234ty2ty234i234e6.jpg", "type":"portrait" }, { "s3_photo_url":"https://olycash-files-b1.s3.amazonaws.com/490004h234ty2t0990ttttp23.jpg", "type":"id" } ], -d zipcode = "256" -d gender = "male" -d birth_date = "322358400" -d oly_boss_id = "RY7-REX-881-TT3"
Recieve (SUCCESS)
http code 200 { "account_id":"{ACCOUNT ID}" }
Send Verification Code
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The account ID of the user. |
send_method | required |
The method by which to send the verification code.
|
new_pin | optional | The new PIN of the user account. |
Start failing after 3 attempts. Notify them to contact us by sending a message in the app or wait for 24 hours to try again.
Send Verification Code
/account/verify (POST)
Send
curl -X POST https://api.olycash.com/v1/account/verify -d account_id = {ACCOUNT ID} -d send_method = "sms" -d new_pin = {PIN}
Recieve (SUCCESS)
http code 200 { "message":"OK", "attempt_number":1 }
Confirm Verification Code
Parameter | Type | DESCRIPTION |
---|---|---|
account_id | required | The account ID of the user. |
code_sent | required | The code sent to the user's contact. |
Confirm Verification Code
/account/confirm (POST)
Send
curl -X POST https://api.olycash.com/v1/account/confirm -d account_id = {ACCOUNT ID} -d code_sent = "8588"
Recieve (SUCCESS)
http code 200 { "OK" }
Check if an email exists
Parameter | Type | DESCRIPTION |
---|---|---|
email_address OR mobile_number |
required |
The email address of the user. OR The user mobile number. |
Note
The Message options: ‘exists’, ‘available’
Check if an email exists
/account/check_email (POST)
Send
curl -X POST https://api.olycash.com/v1/account/check_email -d email_address = "jdoe@email.com" OR -d mobile_number = "256703160225"
Recieve (SUCCESS)
http code 200 { "message":"exists" }
Login
Parameter | Type |
DESCRIPTION
|
---|---|---|
email_address/mobile_number | required | The email address or mobile number of the user. |
password | required | The encrypted password of the user. |
ip_address | required | The user's ip address |
location {latitude, longitude, city, state, zipcode, country} | optional | The user's location |
Login
/account/login (POST)
Send
curl -X POST https://api.olycash.com/v1/account/login -d email_address = "jdoe@email.com" OR -d mobile_number = "256774780435" -d password(encrypted) = {PASSWORD}
Recieve (SUCCESS)
http code 200 { "account_id": "{ACCOUNT ID}", "user_id": "AC1-36D-638-E37", "expiry_period":"7200", "active_modes": ["shopper","olyboss","seller"], "date_opened": 1480723205, "full_name": "John Doe", "email_address": "jdoe@email.com", "telephone": "256774780435", "photos": [ { "s3_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e37.jpg", "type": "potrait" }, { "s3_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/user-57f4574ebbd6ac136d638e37-1.jpg", "type": "icon" } ] }
Send 2FA code
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The email address or mobile number of the user. |
send_method | required | The method used to send the code. Options: telephone, email_address |
stage | optional | The stage of the 2FA. Options: send (default), verify |
ip_address | required | The IP address of the user location. |
appid | optional | The ID of the app accessing the API. |
Send 2FA code
/account/two_factor_auth (POST)
Send
curl -X GET https://api.olycash.com/v1/account/two_factor_auth -d account_id = {ACCOUNT ID} -d send_method = {TELEPHONE or EMAIL ADDRESS} -d stage = {SEND or VERIFY} -d ip_address = {IP ADDRESS} -d appid = {APP ID}
Recieve (SUCCESS)
http code 200 { "message": "OK", "expires": "2fa-code-expiry-timestamp" }
Verify 2FA code
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The account ID of the user. |
send_method | required | The method used to send the code. Options: telephone, email_address |
stage | optional | The stage of the 2FA. Options: send (default), verify |
code | optional | The code sent to the user. Required if stage = verify |
ip_address | required | The IP address of the user location. |
appid | required | The ID of the app accessing the API. |
Verify 2FA code
/account/two_factor_auth (POST)
Send
curl -X GET https://api.olycash.com/v1/account/two_factor_auth -d account_id = {ACCOUNT ID} -d send_method = {SEND METHOD} -d stage = {VERIFY} -d code = {CODE} -d ip_address = {IP ADDRESS} -d appid = {APP ID}
Recieve (SUCCESS)
http code 200 { "message": "OK" }
Recover Password (With PIN)
Parameter | Type |
DESCRIPTION
|
---|---|---|
email_address OR mobile_number |
required |
The user email address. OR The user mobile number. |
PIN | required | The PIN of the user account. |
Recover Password (With PIN)
/account/recover_password (POST)
Send
curl -X POST https://api.olycash.com/v1/account/recover_password -d email_address = "jdoe@email.com" OR -d mobile_number = "256774780435" -d PIN = {PIN}
Recieve (SUCCESS)
http code 200 { "OK" }
Logout
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The ID of the user account. |
Logout
/account/logout (POST)
Send
curl -X POST https://api.olycash.com/v1/account/logout -d account_id = {ACCOUNT ID}
Recieve (SUCCESS)
http code 200 { "OK" }
Update Settings
Parameter | Type | DeSCRIPTION |
---|---|---|
account_id | required | The ID of the user account. |
fields | required | The associative array of the fields to update together with their new values. |
Update Settings
/account/update (POST)
Send
curl -X POST https://api.olycash.com/v1/account/update -d account_id = {ACCOUNT ID} -d fields = { "new_pin(encrypted_pin)":{NEW PIN}, "old_pin(encrypted_pin)":{OLD PIN}, "email_address":"jdoe@email.com", etc }
Recieve (SUCCESS)
http code 200 { "OK" }
Close Account
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The ID of the user account. |
old_pin | required | The old (current active) PIN of the user. |
reason | optional | The reason for closure. |
Close Account
/account/close (POST)
Send
curl -X POST https://api.olycash.com/v1/account/close -d account_id = {ACCOUNT ID} -d old_pin = {OLD PIN} -d reason = "reason for closure"
Recieve (SUCCESS)
http code 200 { "OK" }
View Seller Account Settings
Parameter | Type |
DESCRIPTION
|
---|---|---|
seller_account_id | required | The ID of the user account. |
View Seller Account Settings
/account/seller_settings (GET)
Send
curl -X GET https://api.olycash.com/v1/account/seller_settings -d seller_account_id = {SELLER ACCOUNT ID}
Recieve (SUCCESS)
http code 200 { "seller_account_id": "{SELLER ACCOUNT ID}", "name": "Kyaliwajala Limited", "logo_s3_url": "https:\/\/olycash-files-b1.s3.amazonaws.com\/store-57f4574ebbd6ac136d638e37.jpg", "website": "https:\/\/www.kayliwajala.stores.com", "description": "We sell all general merchandise for groceries and building.", "location": "230 Wilston Street, Kampala, Uganda. ZipCode 256", "code_expiry_period":"48", "categories": [ { "id":"ebbd6ac136d6", "level_1_tag":"General Retail" }, { "id":"1c136d638e37", "level_2_tag":"Grocery Store" } ] }
Update Seller Account Settings
Parameter | Type | Details |
---|---|---|
seller_account_id | required | The ID of the user account. |
details{} | required | The associative array of the details of the fields in the seller account to be updated. |
Update Seller Account Settings
/account/seller_settings (POST)
Send
curl -X POST https://api.olycash.com/v1/account/seller_settings -d seller_account_id = {SELLER ACCOUNT ID} -d details = { "website":"jdoe@email.com", "code_expiry_period":"1480723250", etc }
Recieve (SUCCESS)
http code 200 { "OK" }
View OlyBoss Account Settings
Parameter | Type |
DESCRIPTION
|
---|---|---|
boss_account_id | required | The ID of the user account. |
View OlyBoss Account Settings
/account/boss_settings (GET)
Send
curl -X GET https://api.olycash.com/v1/account/boss_settings -d boss_account_id = {BOSS ACCOUNT ID}
Recieve (SUCCESS)
http code 200 { "boss_account_id": "{BOSS ACCOUNT ID}", "show_my_location": "on", "business_hours": "9am-5pm Monday to Friday, 11am-5pm Saturday to Sunday", "rates": "UGX 500 (Below UGX30,000), Negotiable (Above UGX2m), 5% Other amounts" }
Update OlyBoss Account Settings
Parameter | Type |
DESCRIPTION
|
---|---|---|
boss_account_id | required | The ID of the user account. |
details{} | required | The associative array of the details of the fields in the OlyBoss account to be updated. |
Note
Only the fields to update are included in the details.
Update OlyBoss Account Settings
/account/boss_settings (POST)
Send
curl -X POST https://api.olycash.com/v1/account/boss_settings -d boss_account_id = {BOSS ACCOUNT ID} -d details = { "show_my_location": "on", "business_hours": "8am-4pm Monday to Friday, 8am-12pm Saturday to Sunday", "rates": "UGX 600 (Below UGX40,000), Negotiable (Above UGX2m), 5% Other amounts" }
Recieve (SUCCESS)
http code 200 { "OK" }
View User Settings
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The ID of the user account. |
shopper_account_id | required | The ID of the user account |
ip_address | optional | The IP Address of the user |
Note: Option values for active_modes are admin, shopper, boss, seller
View User Settings
/account/view (GET)
Send
curl -X GET https://api.olycash.com/v1/account/view -d account_id = {ACCOUNT ID} -d seller_account_id = {SELLER ACCOUNT ID}
Recieve (SUCCESS)
http code 200 { "account_id": "{SELLER ACCOUNT ID}", "expiry_date": "", "active_modes": ["shopper","boss","seller","super_admin"], "date_opened": "1497539898", "full_name": "Joe Doe", "email_address": "jdoe@gmail.com", "related_address": [jdoe@gmail.com], "telephone": "256700000000", "related_telephones": ["256690000001","00000000000"], "photos": "", "permissions":"" }
Add Account Photo(s)
Parameter | Type |
DESCRIPTION
|
---|---|---|
account_id | required | The account ID of the user. |
photo_list | required | The photo url, type and its details |
ip_address | optional | The ip address of the user |
type_details could be the National ID number for example.
Add Account Photo(s)
/account/add_photo (POST)
Send
curl -X POST https://api.olycash.com/v1/account/add_photo -d account_id = {ACCOUNT ID} -d photo_list = {"photo_url":"", "type":"", "type_details":""} -d ip_address = {IP ADDRESS}
Recieve (SUCCESS)
http code 200 { "message":"OK" }
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. |
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. |
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. |
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. |
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) |
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. |
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. |
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. |
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. |
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} |
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 |
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. |
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. |
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. |
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”. |
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
|
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:
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. |
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. |
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. |
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. |
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
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:
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. |
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. |
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. |
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" ], .. } }