# Create Proposal

### /create/proposal/transactions

<mark style="color:blue;">`GET`</mark> `http://localhost:4003/api/create/proposal/transactions`&#x20;

Returns all Create Proposal Transactions

#### Query Parameters

| Name      | Type    | Description                                                                  |
| --------- | ------- | ---------------------------------------------------------------------------- |
| page      | integer | The number of page to be returned                                            |
| limit     | integer | The number of transaction per page                                           |
| orderBy   | string  | <p>Orders by specific parameter (asc or desc)<br>Example: orderBy=id:asc</p> |
| transform | boolean | Transforms to raw response                                                   |

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

```javascript
{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 4,
    "pageCount": 1,
    "totalCount": 4,
    "next": null,
    "previous": null,
    "self": "/voting/create/proposal/transactions?transform=true&page=1&limit=100",
    "first": "/voting/create/proposal/transactions?transform=true&page=1&limit=100",
    "last": "/voting/create/proposal/transactions?transform=true&page=1&limit=100"
  },
  "data": [
    {
      "id": "8ba1411eb769c3ba7d04b7e353d5c78240705597ee254100164ee77b9999234b",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "duration": {
        "blockHeight": 123456
      },
      "content": "qwertz",
      "timestamp": {
        "epoch": 136819696,
        "unix": 1626920896,
        "human": "2021-07-22T02:28:16.000Z"
      }
    },
    {
      "id": "c8f3fff0df73f1125d15a467b4f9401a7967e2915c93612737b7761cde7ada29",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "duration": {
        "blockHeight": 123456
      },
      "content": "qwertz",
      "timestamp": {
        "epoch": 136819704,
        "unix": 1626920904,
        "human": "2021-07-22T02:28:24.000Z"
      }
    },
    ...
  ]
}
```

{% endtab %}
{% endtabs %}

#### Curl Example

```bash
curl http://localhost:4003/api/create/proposal/transactions
```

###

### /create/proposal/transactions/:id

<mark style="color:blue;">`GET`</mark> `http://localhost:4003/api/create/proposal/transactions/:id`&#x20;

Returns Create Proposal Transaction by id.

#### Path Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| id   | string | Transaction Id |

#### Query Parameters

| Name      | Type    | Description                |
| --------- | ------- | -------------------------- |
| transform | boolean | Transforms to raw response |

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

```javascript
{
  "data": {
    "id": "fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30",
    "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "duration": {
      "blockHeight": 123456
    },
    "content": "QmPfdpTRbhGVZZWKZDzNT5T4NB6C7fFo5wM9Xe8qmLCXWt",
    "timestamp": {
      "epoch": 142719560,
      "unix": 1632820760,
      "human": "2021-09-28T09:19:20.000Z"
    }
  }
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Transaction not found!"
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
{
  "statusCode": 422,
  "error": "Unprocessable Entity",
  "message": "\"id\" length must be 64 characters long"
}
```

{% endtab %}
{% endtabs %}

#### Curl Example

```bash
curl http://localhost:4003/api/create/proposal/transactions/fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30
```

### /create/proposal/:id/wallet

<mark style="color:blue;">`GET`</mark> `http://localhost:4003/api/create/proposal/:id/wallet` &#x20;

Returns wallet by Create Proposal transaction id

#### Path Parameters

| Name | Type   | Description                    |
| ---- | ------ | ------------------------------ |
| id   | string | Create Proposal transaction id |

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

```javascript
{
  "data": {
    "address": "ANBkoGqWeTSiaEVgVzSKZd3jS7UWzv9PSo",
    "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "nonce": "36",
    "balance": "244863000000000",
    "proposals": {
      "8ba1411eb769c3ba7d04b7e353d5c78240705597ee254100164ee77b9999234b": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "qwertz"
        },
        "agree": [],
        "disagree": []
      },
      "c8f3fff0df73f1125d15a467b4f9401a7967e2915c93612737b7761cde7ada29": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "qwertz"
        },
        "agree": [
          "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37"
        ],
        "disagree": []
      },
      "9268a2dba346f7a9673877755061b5ba0bd14f72beeced37b877022aca2aed92": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "QmPfdpTRbhGVZZWKZDzNT5T4NB6C7fFo5wM9Xe8qmLCXWt"
        },
        "agree": [],
        "disagree": []
      },
      "fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "QmPfdpTRbhGVZZWKZDzNT5T4NB6C7fFo5wM9Xe8qmLCXWt"
        },
        "agree": [],
        "disagree": []
      }
    }
  }
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Wallet not found!"
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
{
  "statusCode": 422,
  "error": "Unprocessable Entity",
  "message": "\"id\" length must be 64 characters long"
}
```

{% endtab %}
{% endtabs %}

#### Curl Example

```bash
curl http://localhost:4003/api/create/proposal/fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30/wallet
```
