# Retrieve Order

#### Overview <a href="#confirmorder-overview" id="confirmorder-overview"></a>

This endpoint returns your order's current state&#x20;

#### HTTP Request <a href="#confirmorder-httprequest" id="confirmorder-httprequest"></a>

`GET /order/get`

#### Request Body <a href="#confirmorder-requestbody" id="confirmorder-requestbody"></a>

To get an order, provide the order ID in the query parameters of your request.

**Request Query Parameters**

| Field     | Type   | Description                          |
| --------- | ------ | ------------------------------------ |
| `orderId` | string | The unique identifier for the order. |

**Example Response**

```json
{
    "message": "Your order",
    "data": {
        "uid": "IW63OjZJW9eI21KJ1ohy",
        "state": "successful",
        "products": {
            "gc035-208-1000": {
                "request": {
                    "quote": 1000,
                    "quantity": 1
                },
                "customerDeal": {
                    "dealState": "ACTIVE",
                    "fee": {
                        "amount": 0,
                        "adjustmentMode": "percentage"
                    },
                    "discount": {
                        "amount": 0,
                        "adjustmentMode": "percentage"
                    }
                },
                "sku": "gc035-208-1000",
                "shopItem": {
                    "country": "DK",
                    "quote": 1000,
                    "name": "Adidas DK-1000",
                    "region": "local",
                    "productType": "fixed",
                    "baseCurrency": "DKK"
                }
            }
        },
        "exchangeRates": [
            {
                "targetCurrency": "DKK",
                "rate": 7.456803455723542,
                "modifiedDate": {
                    "_seconds": 1713700802,
                    "_nanoseconds": 866000000
                },
                "baseCurrency": "EUR"
            }
        ],
        "invoice": {
            "total": 134.11,
            "wallet": "EUR",
            "records": [
                {
                    "total": {
                        "EUR": 134.11,
                        "DKK": 0
                    },
                    "sku": "gc035-208-1000",
                    "items": [
                        {
                            "metaData": {
                                "quantity": 1,
                                "quote": 1000
                            },
                            "effect": {
                                "amount": 1000,
                                "currency": "DKK"
                            },
                            "description": "Adidas DK-1000",
                            "type": "main-product"
                        },
                        {
                            "metaData": {
                                "targetCurrency": "DKK",
                                "rate": 7.456803455723542,
                                "modifiedDate": {
                                    "_seconds": 1713700802,
                                    "_nanoseconds": 866000000
                                },
                                "baseCurrency": "EUR"
                            },
                            "effect": {
                                "amount": -1000,
                                "currency": "DKK"
                            },
                            "description": "Even out target currency: DKK",
                            "type": "exchange-target-currency"
                        },
                        {
                            "metaData": {
                                "targetCurrency": "DKK",
                                "rate": 7.456803455723542,
                                "modifiedDate": {
                                    "_seconds": 1713700802,
                                    "_nanoseconds": 866000000
                                },
                                "baseCurrency": "EUR"
                            },
                            "effect": {
                                "amount": 134.11,
                                "currency": "EUR"
                            },
                            "description": "Payment in base currency: DKK",
                            "type": "exchange-base-currency"
                        }
                    ]
                }
            ],
            "paymentMethod": "balance",
            "status": "paid"
        },
        "createdDate": {
            "_seconds": 1713718950,
            "_nanoseconds": 921000000
        },
        "modifiedDate": {
            "_seconds": 1713718958,
            "_nanoseconds": 712000000
        },
        "redeem": {
            "gc035-208-1000": {
                "redeemPin": [
                    "MV97-QWEK-4EQ5-0082-GRW3"
                ],
                "currency": "DKK",
                "redeemLink": "https://www.mocked.link/",
                "value": 1000
            }
        },
        "reference": "Test Referance"
    }
}
```

#### Order State Entities   <a href="#confirmorder-statuscodes" id="confirmorder-statuscodes"></a>

Can have one of the following values:

* `created`&#x20;
* `confirmed`
* `rejected` &#x20;
* `processing`
* `failed` if all requested products run into an error while processing an order
* `partial` if some requested products run into an error while processing an order
* `successful` all requested products successful

#### Order Redeem Data <a href="#confirmorder-examplerequest" id="confirmorder-examplerequest"></a>

If the order has `successful` or `partial` state, the `redeem` property will be filled with the redeem data. Read more about the data type [here](https://neomsolutions.gitbook.io/gifthub-api-doc/orders/redeem)

#### Example Request <a href="#confirmorder-examplerequest" id="confirmorder-examplerequest"></a>

Using `curl` to make a request to confirm an order:

```javascript
curl -X GET "{{base_url}}/order/get?orderId=xNQolCGOWz6s79hcmyKE" \
     -H "Content-Type: application/json" 
```

#### &#x20;<a href="#confirmorder-notes" id="confirmorder-notes"></a>
