How to Get the Shipment Transactions

Modified on Sat, 1 Feb at 9:34 PM

Our API allows you to retrieve detailed shipment transaction records, including financial details, using the getShipmentTransactions endpoint. This guide explains how to fetch shipment transactions efficiently.


Instructions


Step 1: API Endpoint

  • To get shipment transactions, use the following GET endpoint:
    https://api.tryoto.com/rest/v2/getShipmentTransactions



Step 2: Authorization

  • A valid Bearer Token must be included in the request headers for authentication



Step 3: Request Body Parameters

  • The request body should be in JSON format and must include at least one date filter.


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
shipmentNumbernostringShipment Number for transactions of a single shipment



Step 4: Example Request

  • Below is an example request to retrieve shipment transactions within a specific date range:

    Using cURL:

    curl --location 'https://api.tryoto.com/rest/v2/shipmentTransactions?perPage=10&page=1&minDate=2024-01-01&maxDate=2024-09-14'



Step 5: Example Response

  • A successful response will return the shipment transaction details:

    {

      "success": true,

      "shipments": [

        {

          "shipmentNumnber": "1231231AS",

          "orderId": "123123",

          "shipmentCreationDate": "2023-12-05T06:47:46",

          "deliveryCompanyName": "deliveryCompany",

          "dcConnectionName": "connectionName",

          "shipmentType": "Forward Shipment",

          "dcCharge": 25,

          "currency": "TRY",

          "originalWeight": 100,

          "dcUpdatedWeight": 50,

          "status": "status",

          "dcInvoiceNumber": 15579456

        },

        {

          "shipmentNumnber": "12435356",

          "orderId": "342324234",

          "shipmentCreationDate": "2023-12-05T06:47:46",

          "deliveryCompanyName": "deliveryCompany",

          "dcConnectionName": "connectionName",

          "shipmentType": "Forward Shipment",

          "dcCharge": 40,

          "currency": "TRY",

          "originalWeight": 40,

          "dcUpdatedWeight": 5,

          "status": "status",

          "dcInvoiceNumber": 21626353729823

        },

        {

          "shipmentNumnber": "657567",

          "orderId": "34534534",

          "shipmentCreationDate": "2023-12-05T06:47:46",

          "deliveryCompanyName": "deliveryCompany",

          "dcConnectionName": "connectionName",

          "shipmentType": "Forward Shipment",

          "dcCharge": 60,

          "currency": "TRY",

          "originalWeight": 80,

          "dcUpdatedWeight": 80,

          "status": "status",

          "dcInvoiceNumber": 21626353729823120000

        },

        {

          "shipmentNumnber": "5423423",

          "orderId": "14335213",

          "shipmentCreationDate": "2023-12-05T06:47:46",

          "deliveryCompanyName": "deliveryCompany",

          "dcConnectionName": "connectionName",

          "shipmentType": "Forward Shipment",

          "dcCharge": 25,

          "currency": "TRY",

          "originalWeight": 100,

          "dcUpdatedWeight": 50,

          "status": "status",

          "dcInvoiceNumber": 2162635372

        }

      ]

    }


In case of an empty result, the shipments 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