Show Delivery Receipts

This page provides an endpoint to get Receipts for Deliveries. Show Delivery Receipts endpoint is enabled upon request. Please contact your account manager to enable this API for your account.

A Receipt is a detailed explanation of all charges the Delivery Platform applies to your Delivery. Charges depend on the terms of your contract. Please contact your account manager to learn more about the tariff and charges that apply to your account.

It is important to mention that charges in your Receipt are grouped by Journey. "Journey" is a single ride of a courier who brings delivery to the recipient. If the Courier brought multiple Deliveries in a single ride then the Receipt might contain charges that apply to Journey as a whole along with charges that apply to a single delivery.

The Show Delivery Receipt provides a factual price. It is available only when delivery is completed.

The Journey contains multiple Deliveries if you provide an array of multiple deliveries in one Create delivery request or if you explicitly add Deliveries in a single Bundle.

Please note although you can create deliveries individually your account might be configured to allow aggregating deliveries into Journeys to speed up the courier assignments and shorten the overall delivery cycle. Please contact your account manager to learn more about aggregation.

Price per delivery

If the journey contains multiple deliveries you might want to identify the factual expenses attributed per each delivery. Although you can see factual charges per journey the platform calculates the factual delivery price.

  • If journey expenses contain charges related to the entire journey: distance, waiting, or duration then these expenses will be attributed to the first delivery in a journey.
  • If journey expenses contain return delivery, then the return fee will also be allocated for the first delivery in a journey.
  • If journey expenses contain a pickup cancellation fee then it will be attributed for the first delivery in a journey while the price for the rest of deliveries will be 0.

Resource

GET v1/delivery/deliveries/receipts

Authorization

OAuth 2.0 bearer token with Delivery scope.

Query Parameters

Name

Type

Description

business_id

string

Unique identifier representing a Business. (ex: IL-7436)
(equivalent to company_id in response body)

from

timestamp

The "From" date deliveries will be queried
format

till

timestamp

The "Till" date deliveries will be queried
format

request_uuids

string

Delivery UUID. Use this parameter to filter receipts by the list of deliveries. Your can specify multiple request_uuids to request multiple receipts in a single query.

Filtering Options

Show Delivery Receipts API can filter Receipts either by the time of delivery creation or by the list of deliveries.

To filter by creation time use "from" and "till" parameters:

GET https://api.gett.com/v1/delivery/deliveries/receipts?business_id=RU-7436&
        from=2021-08-18T06%3A00%3A01.000000Z&
        till=2021-08-18T07%3A00%3A01.000000Z

To filter by the list of deliveries use "request_uuids" parameter:

GET https://api.gett.com/v1/delivery/deliveries/receipts?business_id=RU-7436&
        request_uuids=DR-e016a691b5c4a6de87baacbbb342e5c6

You can use an array of "request_uuids" to query receipts for multiple deliveries in a single request:

GET https://api.gett.com/v1/delivery/deliveries/receipts?business_id=RU-7436&
        request_uuids=DR-4b82b236cc2122dfb29404bc848005c1&
        request_uuids=DR-69972347cb236c49be402fb23541e8da&
        request_uuids=DR-bcdb09cf826943b95c54eb78fdc8480d

If you provide "from" and "till" parameters along with "request_uuids" parameter, the platform will respond with the "400" HTTP Error Code.

Response

[
    {
        "charges": [
            {
                "returns": 0
            },
            {
                "statuses": 200
            },
            {
                "distance": 49.5
            },
            {
                "duration": 88
            },
            {
                "waiting": 0
            },
            {
                "pickup_cancellation": 0
            }
        ],
        "currency": "RUB",
        "deliveries": [
            {
                "identifier": "38314860",
                "order_id_representation": "RQ1234567890QM",
                "price": 337.5,
                "request_uuid": "DR-4b82b236cc2122dfb29404bc848005c1",
                "status": "completed"
            }
        ],
        "distance_in_meters": 7487,
        "duration_in_minutes": 18,
        "journey_identifier": "gett-1",
        "scheduled_at": "2021-09-15T19:12:05.996768Z",
        "total": 337.5
    }
]

Where:

  • charges is an array of charges applied per journey.
  • deliveries[x].identifier is a display identifier of a delivery (usually representing a unique identifier in a client's platform).
  • deliveries[x].order_id_representation is an EDP internal delivery identifier.
  • deliveries[x].price is a price per delivery in a journey.
  • deliveries[x].request_uuid is a unique delivery uuid.
  • deliveries[x].status is a delivery status.
  • charges contains an array of price components.
  • deliveries contains an array of deliveries that were delivered by a courier in a Journey.
  • distance_in_meeters is the total distance traveled by courier per journey. If the journey contains no distance fee then this parameter is omitted.
  • duration_in_minutes is the total time spent by courier per journey. If the journey contains no duration fee then this parameter is omitted.
  • total is a sum of all charges applied per journey.

The first example shows a receipt for a simple Journey that contains only one delivery.

[
    {
        "charges": [
            {
                "pickup_cancellation": 0
            },
            {
                "returns": 0
            },
            {
                "statuses": 400
            },
            {
                "waiting": 50
            },
            {
                "distance": 50
            },
            {
                "duration": 75
            }
        ],
        "currency": "RUB",
        "deliveries": [
            {
                "identifier": "38309224",
                "order_id_representation": "RQ1234567890QM",
                "price": 375,
                "request_uuid": "DR-4b82b236cc2122dfb29404bc848005c1",
                "status": "completed"
            },
            {
                "identifier": "38310811",
                "order_id_representation": "RQ1234567890QM",
                "price": 200,
                "request_uuid": "DR-b1d3d24c45c54ab78fd6997234faf3bd",
                "status": "completed"
            }
        ],
        "distance_in_meters": 7500,
        "duration_in_minutes": 20,
        "journey_identifier": "gett-1",
        "scheduled_at": "2021-09-15T18:09:45.058054Z",
        "total": 575
    }
]

The second example shows a more complex Journey that contains 2 deliveries.

Sandbox

Resource:

GET /v1/delivery_sandbox/deliveries/receipts

More info can be found here


Did this page help you?