Get Order Shipping Group by ID
GET Get Order Shipping Group by ID
https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups/:shippingGroupID
Once the checkout process is completed, an order is created, and the shipping group is associated with the order. The relation field in the response body is changed to order, and the relevant order_id is added to the shipping groups, indicating that the shipping group has been checked out.
Parameters
Path parameters
| Name | Required | Type | Description | 
|---|---|---|---|
| orderID | Required | string | The unique identifier of the order to retrieve all shipping groups for an order. | 
| shippingGroupID | Required | string | The unique identifier of the shipping group for an order. | 
Headers
| Name | Required | Type | Description | 
|---|---|---|---|
| Authorization | Required | string | The Bearer token required to get access to the API. | 
Request Example
curl -X GET https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups/:shippingGroupID
    -H "Authorization: Bearer XXXX" \
    -H "content-type: application/json" \
Response Example
200 OK
{
    "data": {
        "type": "shipping_group",
        "id": "e6044587-937c-4926-9132-40c9f7c9b677",
        "relation": "order",
        "order_id": "c2301903-7b32-4eaa-981b-0ed078789926",
        "cart_id": "1234",
        "shipping_type": "UPS Ground",
        "tracking_reference": "ground_1234",
        "address": {
            "first_name": "Andy",
            "last_name": "Dwyer",
            "company_name": "Ron Swanson Enterprises",
            "line_1": "1 Sunny Street",
            "line_2": "",
            "city": "Vancouver",
            "postcode": "92802",
            "county": "Orange",
            "country": "US",
            "region": "WA"
        },
        "delivery_estimate": {
            "start": "2023-04-26T22:52:19Z",
            "end": "2023-04-27T22:52:19Z"
        },
        "created_at": "2023-07-10T22:57:11.333Z",
        "updated_at": "2023-07-10T22:57:35.458Z",
        "relationships": {
            "order": {
                "data": {
                    "type": "order",
                    "id": "c2301903-7b32-4eaa-981b-0ed078789926"
                }
            }
        },
        "meta": {
            "shipping_display_price": {
                "total": {
                    "amount": 160,
                    "currency": "USD",
                    "formatted": "$1.60"
                },
                "base": {
                    "amount": 100,
                    "currency": "USD",
                    "formatted": "$1.00"
                },
                "tax": {
                    "amount": 50,
                    "currency": "USD",
                    "formatted": "$0.50"
                },
                "fees": {
                    "amount": 10,
                    "currency": "USD",
                    "formatted": "$0.10"
                }
            },
            "total_display_price": {
                "with_tax": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "$3.60"
                },
                "without_tax": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "$3.60"
                },
                "tax": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "discount": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "balance_owing": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "360"
                },
                "paid": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "authorized": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "without_discount": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "360"
                },
                "shipping": {
                    "amount": 160,
                    "currency": "USD",
                    "formatted": "$1.60"
                }
            }
        }
    }
}
GET Include Items for a Shipping Group
https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups/:shippingGroupID?include=items
Parameters
Path parameters
| Name | Required | Type | Description | 
|---|---|---|---|
| cartID | Required | string | The unique identifier of the cart to retrieve a shipping group for a cart. | 
| shippingGroupID | Required | string | The unique identifier of the shipping group related to a cart. | 
Query parameters
| Name | Required | Type | Description | 
|---|---|---|---|
| include | Required | string | The cart items for a shipping group. | 
Request Example
curl -X GET https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups/:shippingGroupID?include=items
    -H "Authorization: Bearer XXXX" \
Response Example
200 OK
{
    "data": {
        "type": "shipping_group",
        "id": "e6044587-937c-4926-9132-40c9f7c9b677",
        "relation": "order",
        "order_id": "c2301903-7b32-4eaa-981b-0ed078789926",
        "cart_id": "1234",
        "shipping_type": "UPS Ground",
        "tracking_reference": "ground_1234",
        "address": {
            "first_name": "Andy",
            "last_name": "Dwyer",
            "company_name": "Ron Swanson Enterprises",
            "line_1": "1 Sunny Street",
            "line_2": "",
            "city": "Vancouver",
            "postcode": "92802",
            "county": "Orange",
            "country": "US",
            "region": "WA"
        },
        "delivery_estimate": {
            "start": "2023-04-26T22:52:19Z",
            "end": "2023-04-27T22:52:19Z"
        },
        "created_at": "2023-07-10T22:57:11.333Z",
        "updated_at": "2023-07-10T22:57:35.458Z",
        "relationships": {
            "order": {
                "data": {
                    "type": "order",
                    "id": "c2301903-7b32-4eaa-981b-0ed078789926"
                }
            }
        },
        "meta": {
            "shipping_display_price": {
                "total": {
                    "amount": 160,
                    "currency": "USD",
                    "formatted": "$1.60"
                },
                "base": {
                    "amount": 100,
                    "currency": "USD",
                    "formatted": "$1.00"
                },
                "tax": {
                    "amount": 50,
                    "currency": "USD",
                    "formatted": "$0.50"
                },
                "fees": {
                    "amount": 10,
                    "currency": "USD",
                    "formatted": "$0.10"
                }
            },
            "total_display_price": {
                "with_tax": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "$3.60"
                },
                "without_tax": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "$.60"
                },
                "tax": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "discount": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "balance_owing": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "$3.60"
                },
                "paid": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "authorized": {
                    "amount": 0,
                    "currency": "USD",
                    "formatted": "0"
                },
                "without_discount": {
                    "amount": 360,
                    "currency": "USD",
                    "formatted": "$3.60"
                },
                "shipping": {
                    "amount": 160,
                    "currency": "USD",
                    "formatted": "$1.60"
                }
            }
        }
    },
    "included": {
        "items": [
            {
                "type": "order_item",
                "id": "14f96347-b93d-4b48-9c2a-dd01cf604a13",
                "quantity": 1,
                "product_id": "",
                "name": "My Custom Item 5",
                "sku": "SKU5",
                "unit_price": {
                    "amount": 200,
                    "currency": "USD",
                    "includes_tax": true
                },
                "value": {
                    "amount": 200,
                    "currency": "USD",
                    "includes_tax": true
                },
                "links": {},
                "meta": {
                    "display_price": {
                        "with_tax": {
                            "unit": {
                                "amount": 200,
                                "currency": "USD",
                                "formatted": "$2.00"
                            },
                            "value": {
                                "amount": 200,
                                "currency": "USD",
                                "formatted": "$2.00"
                            }
                        },
                        "without_tax": {
                            "unit": {
                                "amount": 200,
                                "currency": "USD",
                                "formatted": "$2.00"
                            },
                            "value": {
                                "amount": 200,
                                "currency": "USD",
                                "formatted": "$2.00"
                            }
                        },
                        "tax": {
                            "unit": {
                                "amount": 0,
                                "currency": "USD",
                                "formatted": "0"
                            },
                            "value": {
                                "amount": 0,
                                "currency": "USD",
                                "formatted": "0"
                            }
                        },
                        "discount": {
                            "unit": {
                                "amount": 0,
                                "currency": "USD",
                                "formatted": "0"
                            },
                            "value": {
                                "amount": 0,
                                "currency": "USD",
                                "formatted": "0"
                            }
                        },
                        "without_discount": {
                            "unit": {
                                "amount": 200,
                                "currency": "USD",
                                "formatted": "$2.00"
                            },
                            "value": {
                                "amount": 200,
                                "currency": "USD",
                                "formatted": "$2.00"
                            }
                        }
                    },
                    "timestamps": {
                        "created_at": "2023-07-10T22:57:35Z",
                        "updated_at": "2023-07-10T22:57:35Z"
                    }
                },
                "relationships": {
                    "cart_item": {
                        "data": {
                            "type": "cart_item",
                            "id": "081f217f-c6e1-47ae-9e56-3cf2e746662c"
                        }
                    }
                },
                "shipping_group_id": "e6044587-937c-4926-9132-40c9f7c9b677"
            }
        ]
    }
}