Skip to content

Instantly share code, notes, and snippets.

@lin-d-hop
Created December 5, 2020 13:06
Show Gist options
  • Save lin-d-hop/ddff6fba7a08e39b9edccc224d560683 to your computer and use it in GitHub Desktop.
Save lin-d-hop/ddff6fba7a08e39b9edccc224d560683 to your computer and use it in GitHub Desktop.
A snippet of a response from orders/{number} endpoint
{
"id": 1465395,
"number": "R185726477",
"user_id": 211695,
"full_name": "H",
"email": "h@yahoo.com",
"phone": "07977777777",
"completed_at": "December 02, 2020",
"display_total": "£153.68",
"edit_path": "/admin/orders/R185726477/edit",
"state": "complete",
"payment_state": "paid",
"shipment_state": "ready",
"payments_path": "/admin/orders/R185726477/payments",
"ready_to_ship": true,
"ready_to_capture": null,
"created_at": "December 02, 2020",
"distributor_name": "Aberystwyth Food Hub (New Online Farmers' Market)",
"special_instructions": null,
"display_outstanding_balance": "",
"item_total": "123.13",
"adjustment_total": "30.55",
"payment_total": "153.68",
"total": "153.68",
"distributor": {
"id": 201537
},
"order_cycle": {
"id": 206678
},
"shipping_method": {
"id": 200675,
"require_ship_address": false,
"name": "Collection time slots... ",
"description": "After the order window closes you will receive an email confirming your personal collection time slot.\r\nVenue: The Morlan Centre, Queen's Parade, Aberystwyth, SY23 2HH\r\n\r\nPlease turn up for your collection time slot in order to ensure this service is as safe as possible for everyone involved. Thanks for your understanding on this important matter",
"price": 0
},
"ship_address": {
"id": 638578,
"zipcode": "SY23 1AA",
"city": "Aberystwyth",
"state_name": "Ceredigion",
"state_id": 89,
"phone": "07977777777",
"firstname": "H",
"lastname": "O",
"address1": "Q Rd",
"address2": "Centre",
"country_id": 44,
"country_name": "United Kingdom"
},
"bill_address": {
"id": 638576,
"zipcode": "SY23 1AA",
"city": "Aberystwyth",
"state_name": "Ceredigion",
"state_id": 89,
"phone": "07977777777",
"firstname": "H",
"lastname": "O",
"address1": "Q Rd",
"address2": "Centre",
"country_id": 44,
"country_name": "United Kingdom"
},
"line_items": [
{
"id": 1116853,
"quantity": 2,
"max_quantity": null,
"price": 3,
"variant": {
"id": 253904,
"is_master": false,
"product_name": "Beetroot",
"sku": "",
"options_text": "500g",
"unit_value": 500,
"unit_description": "",
"unit_to_display": "500g",
"display_as": null,
"display_name": null,
"name_to_display": "Beetroot",
"price": "1.42",
"on_demand": true,
"on_hand": 32,
"fees": {},
"price_with_fees": "1.42",
"tag_list": [],
"thumb_url": "https://ofn-uk-production.s3.us-east-1.amazonaws.com/public/spree/products/15323/mini/5588A47E-6440-4508-9A87-250CCCB7A48A.jpeg?1603359545"
}
}]
"adjustments": [
{
"id": 10257631,
"amount": "-0.6",
"label": "Beetroot - admin fee by supplier Aberystwyth Food Hub (New Online Farmers' Market)",
"eligible": true,
"source_type": "Spree::LineItem",
"source_id": 1116853,
"adjustable_type": "Spree::Order",
"adjustable_id": 1465395,
"originator_type": "EnterpriseFee",
"originator_id": 200402
},
{
"id": 10257632,
"amount": "0.1",
"label": "Beetroot - packing fee by coordinator Aberystwyth Food Hub (New Online Farmers' Market)",
"eligible": true,
"source_type": "Spree::LineItem",
"source_id": 1116853,
"adjustable_type": "Spree::Order",
"adjustable_id": 1465395,
"originator_type": "EnterpriseFee",
"originator_id": 200384
},
{
"id": 10257744,
"amount": "0.0",
"label": "Transaction fee",
"eligible": true,
"source_type": "Spree::Payment",
"source_id": 324534,
"adjustable_type": "Spree::Order",
"adjustable_id": 1465395,
"originator_type": "Spree::PaymentMethod",
"originator_id": 200403
},
{
"id": 10257745,
"amount": "0.0",
"label": "Shipping",
"eligible": true,
"source_type": "Spree::Shipment",
"source_id": 314244,
"adjustable_type": "Spree::Order",
"adjustable_id": 1465395,
"originator_type": "Spree::ShippingMethod",
"originator_id": 200675
}
],
"payments": [
{
"amount": "153.68",
"updated_at": "Dec 02, 2020 08:15",
"payment_method": "Credit and Debit Card Payment",
"state": "completed"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment