These resources show orders associated with the current customer
/orders
List all completed orders associated with the current customer
Name | Type | Description |
---|---|---|
order |
string | [Optional] Sorts orders by id either ascending (ASC ) or descending (DESC )Defaults to ASC |
{
"order": "DESC"
}
{
"status": "ok",
"orders": [
{
"id": 3,
"customer_id": 2,
"plan": {
"id": 1,
"name": "Plan Name 3",
"class": "plan-name-3",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "<p>Plan annotations or else nil</p>",
"tags": [],
"duration": 12,
"display_price": "Free",
"upgrade_price": nil,
"price": 0,
"checkout": "http://test.host/checkout/3?url=2",
"current": false,
"upgrade": false,
"available_to_customer": true,
"package": {}
},
"totals": nil,
"created_at": "January 30, 2013",
"paid_at": "January 30, 2013",
"refunded_at": nil
},
{
"id": 2,
"customer_id": 2,
"plan": {
"id": 2,
"name": "Plan Name 2",
"class": "plan-name-2",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "<p>Plan annotations or else nil</p>",
"tags": [],
"duration": 12,
"display_price": "$50.00",
"upgrade_price": nil,
"price": 50,
"checkout": "http://test.host/checkout/2?url=2",
"current": false,
"upgrade": false,
"available_to_customer": true,
"package": {
"name": "Package 2",
"description": "Package description",
"shipping_and_handling": {
"domestic": "5.0",
"international": "11.0"
},
"items": []
}
},
"totals": {
"shipping": "10.0",
"discount": "5.0",
"subtotal": "50.0",
"total": "55.0"
},
"created_at": "January 30, 2013",
"paid_at": "January 30, 2013",
"refunded_at": nil,
"shipments": [{
"status": "Shipped on Jaunary 1, 2013",
"ship_date": "2013-01-01",
"tracking_url": "https://tools.usps.com/id=9269876",
"items": 3
}]
}
]
}
{
"status": "ok",
"orders": [
{
"id": 2,
"customer_id": 2,
"plan": {
"id": 2,
"name": "Plan Name 2",
"class": "plan-name-2",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "<p>Plan annotations or else nil</p>",
"tags": [],
"duration": 12,
"display_price": "$50.00",
"upgrade_price": nil,
"price": 50,
"checkout": "http://test.host/checkout/2?url=2",
"current": false,
"upgrade": false,
"available_to_customer": true,
"package": {
"name": "Package 2",
"description": "Package description",
"shipping_and_handling": {
"domestic": "5.0",
"international": "11.0"
},
"items": []
}
},
"totals": {
"shipping": "10.0",
"discount": "5.0",
"subtotal": "50.0",
"total": "55.0"
},
"created_at": "January 30, 2013",
"paid_at": "January 30, 2013",
"refunded_at": nil,
"shipments": [{
"status": "Backordered",
"issues": ["missing_shipment_address"]
}]
}
]
}
/orders/{id}
Show specific completed order details for the current customer
Name | Type | Description |
---|---|---|
id |
url segment | [Required] The ID of the desired order |
No parameters required (besides your API key of course).
/orders/489
{
"status": "ok",
"order": {
"id": 489,
"customer_id": 164,
"plan": {
"id": 3,
"name": "Plan Name 30",
"class": "plan-name-30",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "<p>Plan annotations or else nil</p>",
"tags": [],
"duration": 12,
"display_price": "$50.00",
"upgrade_price": nil,
"price": "50.0",
"checkout": "http://test.host/checkout/509?url=144",
"current": false,
"upgrade": false,
"available_to_customer": true,
"package": {
"name": "Package 23",
"description": "Package description",
"shipping_and_handling": {
"domestic": "5.0",
"international": "11.0"
},
"items": []
}
},
"totals": {
"shipping": "10.00",
"discount": "5.00",
"subtotal": "50.00",
"total": "50.00"
},
"created_at": "January 30, 2013",
"paid_at": "January 30, 2013",
"refunded_at": nil,
"billing_address": {
"first_name": "Joe",
"last_name": "Jackson",
"address": "123 Fake St. Suite 11",
"address_2": "",
"city": "Oakland",
"state": "CA",
"postal_code": "94612",
"country": "US"
},
"shipments": [{
"status": "Shipped on Jaunary 1, 2013",
"ship_date": "2013-01-01",
"tracking_url": "https://tools.usps.com/id=9269876",
"shipping_address": {
"first_name": "Naveen",
"last_name": "Jain",
"address": "2201 Broadway",
"address_2": "",
"city": "Oakland",
"state": "CA",
"postal_code": "94612",
"country": "US"
},
"items": [{
"name": "Item 1",
"thumbnail": nil,
"option": "Option 1"
}]
}]
}
}
/orders/489
with queued shipments{
"status": "ok",
"order": {
"id": 489,
"customer_id": 164,
"plan": {
"id": 3,
"name": "Plan Name 30",
"class": "plan-name-30",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "<p>Plan annotations or else nil</p>",
"tags": [],
"duration": 12,
"display_price": "$50.00",
"upgrade_price": nil,
"price": "50.0",
"checkout": "http://test.host/checkout/509?url=144",
"current": false,
"upgrade": false,
"available_to_customer": true,
"package": {
"name": "Package 23",
"description": "Package description",
"shipping_and_handling": {
"domestic": "5.0",
"international": "11.0"
},
"items": []
}
},
"totals": {
"shipping": "10.00",
"discount": "5.00",
"subtotal": "50.00",
"total": "50.00"
},
"created_at": "January 30, 2013",
"paid_at": "January 30, 2013",
"refunded_at": nil,
"billing_address": {
"first_name": "Joe",
"last_name": "Jackson",
"address": "123 Fake St. Suite 11",
"address_2": "",
"city": "Oakland",
"state": "CA",
"postal_code": "94612",
"country": "US"
},
"shipments": [{
"status": "Backordered",
"issues": ["missing_required_option"],
"shipping_address": {
"first_name": "Naveen",
"last_name": "Jain",
"address": "2201 Broadway",
"address_2": "",
"city": "Oakland",
"state": "CA",
"postal_code": "94612",
"country": "US"
}
}]
}
}
{
"status": "error",
"messages": ["No order found"]
}
Issue | Description |
---|---|
missing_shipment_address |
The order being processed is missing a shipping address and the customer does not have a primary shipping address on file. |
missing_required_option |
Customer is missing option required for package associated with the shipment and must provide one prior to the shipment's processing. |
/orders/latest
Shows the latest completed order details for the current customer
No parameters required (besides your API key of course).
{
"status": "error",
"messages": ["No order found"]
}