Orders .: Get User Details

API Reference / v15

Get User-Oriented Order Details

This endpoint returns user-oriented (as opposed to merchant-oriented) data about a specific order. Users may only retrieve details about their own orders. You must use a user access token with the read_user_orders permission in order to access this endpoint.

Request Endpoint

GET /v15/orders/:uuid

Authorization Required – User Token in Header

Authorization: token user="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"

Request Parameters

Param Presence Description
uuid Required The UUID of the order.

cURL Example

curl https://sandbox.thelevelup.com/v15/orders/f7943600849501323c1552668b2aa48c \
  -H Accept:application/json \
  -H Content-Type:application/json \
  -H 'Authorization:token user="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"'

Example Response

HTTP/1.1 200 OK

{
    "order": {
        "bundle_closed_at": "2015-01-22T13:54:09-05:00",
        "bundle_descriptor": "LevelUp*SampleMerchant",
        "contribution_target_name": null,
        "created_at": "2015-01-22T13:54:07-05:00",
        "id": 523146,
        "identifier_from_merchant": "001001",
        "location_id": 19,
        "location_extended_address": "",
        "location_latitude": 42.36033,
        "location_locality": "Boston",
        "location_longitude": -71.0589,
        "location_name": "",
        "location_postal_code": "02114",
        "location_region": "Massachusetts",
        "location_street_address": "1234 Test Street",
        "merchant_id": 34,
        "merchant_name": "SampleMerchant",
        "refunded_at": null,
        "transacted_at": "2015-01-22T13:54:07-05:00",
        "uuid": "f7943600849501323c1552668b2aa48c",
        "balance_amount": 997,
        "contribution_amount": 0,
        "credit_applied_amount": 0,
        "credit_earned_amount": 0,
        "spend_amount": 997,
        "tax_amount": 30,
        "tip_amount": 0,
        "total_amount": 997,
        "items": [{
            "item": {
                "category": "Breakfast Sides",
                "description": "Shredded potatoes griddled to perfection",
                "name": "Hashbrowns",
                "quantity": 1,
                "sku": "01abc192",
                "upc": null,
                "child_items": [{
                    "child_item": {
                        "category": null,
                        "description": "Scattered",
                        "name": "Special Instructions",
                        "quantity": 1,
                        "sku": null,
                        "upc": null,
                        "children": [],
                        "charged_price_amount": 0,
                        "standard_price_amount": 0
                    }
                }, {
                    "child_item": {
                        "category": null,
                        "description": "Smothered",
                        "name": "Onions",
                        "quantity": 1,
                        "sku": null,
                        "upc": null,
                        "children": [],
                        "charged_price_amount": 50,
                        "standard_price_amount": 50
                    }
                }, {
                    "child_item": {
                        "category": null,
                        "description": "Covered",
                        "name": "Cheese",
                        "quantity": 2,
                        "sku": null,
                        "upc": null,
                        "children": [],
                        "charged_price_amount": 100,
                        "standard_price_amount": 100
                    }
                }, {
                    "child_item": {
                        "category": null,
                        "description": "Chunked",
                        "name": "Ham",
                        "quantity": 1,
                        "sku": null,
                        "upc": null,
                        "children": [],
                        "charged_price_amount": 50,
                        "standard_price_amount": 50
                    }
                }],
                "charged_price_amount": 299,
                "standard_price_amount": 299
            }
        }, {
            "item": {
                "category": "Drinks",
                "description": "12oz Can of Coca-Cola",
                "name": "Can Coke",
                "quantity": 2,
                "sku": "291soo01",
                "upc": "04963406",
                "children": [],
                "charged_price_amount": 398,
                "standard_price_amount": 398
            }
        }]
    }
}

Response Parameters

Param Type Description
bundle_closed_at String (Date) or null The time the bundle containing this order closed (or null if it’s still open).
bundle_descriptor String The descriptor (or the best guess at) that this order will show up as on the user’s payment statement.
contribution_target_name String or null The name of the user’s chosen contribution target.
created_at String (Date) The ISO 8601 date and time (YYYY-MM-DDThh:mm:ss±hh:mm) the order was created. See transacted_at for the date and time the order was placed.
id Integer The LevelUp order ID.
identifier_from_merchant String The POS-specific order ID or number for the check. Max 255 characters.
location_id Integer The ID of the location at which the order was placed.
location_extended_address String or null The extended street address (suite or unit number, etc.) of the location at which the order was placed.
location_latitude Float or null The latitude of the location at which the order was placed.
location_locality String The locality (i.e. city) of the location at which the order was placed.
location_longitude Float or null The latitude of the location at which the order was placed.
location_postal_code String The postal code of the location at which the order was placed.
location_region String The region (i.e. state) of the location at which the order was placed.
location_street_address String The street address of the location at which the order was placed.
merchant_id Integer The ID of the merchant at which the order was placed.
merchant_name String The name of the merchant at which the order was placed.
refunded_at String (Date) or null The ISO 8601 date and time (YYYY-MM-DDThh:mm:ss±hh:mm) the order was refunded.
transacted_at String The ISO 8601 date and time (YYYY-MM-DDThh:mm:ss±hh:mm) the user placed the order.
uuid String (UUID) The order’s unique identifier.
balance_amount Integer (Money) The amount (in cents) charged to the user’s credit card.
contribution_amount Integer (Money) or null The amount (in cents) contributed to the user’s chosen contribution target.
credit_applied_amount Integer (Money) The amount (in cents) of all credit used to fund the order.
credit_earned_amount Integer (Money) The amount (in cents) of all credit earned from the order.
spend_amount Integer (Money) The amount (in cents) spent by the user, excluding tip and credit applied.
tax_amount Integer (Money) The tax amount in cents (or null if it’s 0).
tip_amount Integer (Money) The amount (in cents) tipped by the user.
total_amount Integer (Money) The amount (in cents) spent by the user, including tip, but excluding credit applied.
items[] JSON Array The array of items in the order.

Errors

The order was not found or does not belong to the logged in user

HTTP/1.1 404 Not Found