# Get a Single Transaction

The following APIs returns you the details of a single transaction/order.

{% openapi src="/files/VJ5L5wS2EGbqDKD4E9vE" path="/transactions/{txnId}" method="get" %}
[swagger-3.1.4.json](https://407468006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfPzmNpsOZnU4ujov7zQD%2Fuploads%2FGZIhvJMToUafVUW9vM6H%2Fswagger-3.1.4.json?alt=media\&token=79c5c131-7c7d-49b6-be76-227cb5125de1)
{% endopenapi %}

<mark style="color:green;">`GET`</mark> `/transactions/{txnId}`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Params**

| Param | Param Type | Type   | Required | Description           |
| ----- | ---------- | ------ | -------- | --------------------- |
| txnId | query      | Number | Yes      | ID of the transaction |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "string",
  "statusCode": 200,
  "data": {
    "txnId": "string",
    "orderId": "string",
    "orderItemId": "number",
    "txnType": 0,
    "txnTypeLabel":"string",
    "product": {
      "id": "string",
      "title": "string"
    },
    "key": {
      "id": "string"
    },
    "county": "string",
    "amount": "number",
    "commission": "number",
    "campaignFee": "number",
    "vatAmount": "number",
    "txnDate": "string"
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "Bad Request. Wrong/Invalid params format.",
    "statusCode": 400 
}
```

{% endtab %}

{% tab title="401" %}

```
{
    "message": "UnAuthorized request. Invalid/Expired token",
    "statusCode": 401
}
```

{% endtab %}

{% tab title="403" %}

```
{
    "message": "Forbidden Request. Action not allowed or Rate Limit exhausted.", 
    "statusCode": 403
}
```

{% endtab %}

{% tab title="500" %}

```
{
    "message": "Internal Server Error",
    "statusCode": 500
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.driffle.com/driffle-seller-api-legacy/reference/api-reference/transactions/get-a-single-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
