Retrieve Order

Overview

This endpoint returns your order's current state

HTTP Request

GET /order/get

Request Body

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

{
    "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

Can have one of the following values:

  • created

  • confirmed

  • rejected

  • 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

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

Example Request

Using curl to make a request to confirm an order:

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

Last updated