Account APIs

Modified on Wed, 1 Oct at 8:40 PM

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
NameRequiredTypeDescription
amountyesnumberthe 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
NameRequiredTypeDescription
perPageyesnumberCredit transaction count in the response. Max limit 100
pageyesnumberPagination number. You can iterate this field to get all items.
minDateyes (If there is no orderId)dateStarting "Transaction Date" of your credit transactions in "yyyy-mm-dd" format.
maxDateyes (If there is no orderId)dateEnding "Transaction Date" of your credit transactions in "yyyy-mm-dd" format.
orderIdnostringOrder 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article