Account Info
Endpoint URL
GET https://api.tryoto.com/rest/v2/accountInfo
Available Packages: All Packages
This API endpoint retrieves detailed information about the authenticated user's account. This includes general profile details, current subscription and balance of the account.
Note: You can only see the account information that your token belongs to.
Response Body: name: full name of the account owner.
email: email address belong to the account.
mobile: mobile number belong to the account.
packageName: current subscription package name
remainingCredit: balance in account
remainingFreeShipments: number of free shipments offered in campaigns
Buy Credit
Endpoint URL
POST https://api.tryoto.com/rest/v2/buyCredit
Example Request Body
Here is an example of a request body:
{
"amount": 13.5
}
Request Parameters
Name | Required | Type | Description |
---|---|---|---|
amount | yes | number | the amount of credit wanted to buy |
Available Packages: All Packages
Provide amount of credit you wanted to buy, this will response a `paymentURL and paymentID`.
Request Parameters: |
Credit Transactions
Endpoint URL
GET https://api.tryoto.com/rest/v2/creditTransactions?perPage=50&page=1&minDate=2022-01-01&maxDate=2024-06-10
Request Parameters
Name | Required | Type | Description |
---|---|---|---|
perPage | yes | number | Credit transaction count in the response. Max limit 100 |
page | yes | number | Pagination number. You can iterate this field to get all items. |
minDate | yes (If there is no orderId) | date | Starting "Transaction Date" of your credit transactions in "yyyy-mm-dd" format. |
maxDate | yes (If there is no orderId) | date | Ending "Transaction Date" of your credit transactions in "yyyy-mm-dd" format. |
orderId | no | string | Order ID for transactions of a single Order |
Available Packages : Starter Package, Scale Package, Enterprise Package, Marketplaces
This API endpoint provides a powerful way to retrieve credit transaction records from your system. This endpoint supports pagination for efficient data retrieval and allows filtering based on minimum and maximum dates. Additionally, if an `orderId` is provided, the `maxDate` and `minDate` parameters become optional, enabling direct access to transactions associated with the specified order.
Request Parameters: |
#### Response Body
The response will include a `success` flag indicating the status of the request, and an `orders` array containing transaction details. Each transaction object in the `orders` array includes the following properties:
`transactionType` (string) Type of the transaction.
`remainingAmount` (number) The remaining amount for the transaction.
`amount` (number) The transaction amount.
`deliveryCompanyName` (string) Name of the delivery company.
`orderID` (string) ID of the order.
`shipmentID` (string) ID of the shipment.
`description` (string) Description of the transaction.
`ID` (number) Unique ID of the transaction.
`transactionDate` (string) Date of the transaction.
`otoOrderID` (number) OTO (One Time Only) order ID.
`orderPaymentType` (string) Payment type for the order.
`status` (string) Status of the transaction.
`chargeType`(string) Type of the charge(charge, additionalCharge, refund, partialRefund)
`shipmentType`(string) Type of the shipment(forward, return, reverse)
In case of an empty result, the `orders` array will be empty with a `success` flag set to true.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article