shipments
Description
This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.
Actions
- GET
- View a list of shipments
- HEAD
- Get just the header response
- OPTIONS
- Get a response explaining which HTTP methods are supported
- GET
- View a shipment
- HEAD
- Get just the header response
- OPTIONS
- Get a response explaining which HTTP methods are supported
Example Representation
{ "_links": { "curies": [ { "name": "fx", "href": "https://api.foxycart.com/rels/{rel}", "templated": true } ], "self": { "href": "...", "title": "This Collection" }, "first": { "href": "...?offset=0", "title": "First Page of this Collection" }, "prev": { "href": "...?offset=0", "title": "Previous Page of this Collection" }, "next": { "href": "...?offset=0", "title": "Next Page of this Collection" }, "last": { "href": "...?offset=0", "title": "Last Page of this Collection" } }, "_embedded": { "fx:shipments": [...] }, "total_items": "5", "returned_items": 5, "limit": 20, "offset": 0 }
<?xml version="1.0" encoding="UTF-8"?> <resource href="..."> <link rel="self" href="..." title="This Collection"/> <link rel="first" href="...?offset=0" title="First Page of this Collection"/> <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/> <link rel="next" href="...?offset=0" title="Next Page of this Collection"/> <link rel="last" href="...?offset=0" title="Last Page of this Collection"/> <resource href="..." rel="https://api.foxycart.com/rels/shipment"> ... </resource> <total_items>5</total_items> <returned_items>5</returned_items> <limit>20</limit> <offset>0</offset> </resource>
{ "properties": { "total_items": "5", "returned_items": 5, "limit": 20, "offset": 0 }, "entities": [...], "links": [ { "rel": [ "self" ], "href": "..." }, { "rel": [ "first" ], "href": "...?offset=0" }, { "rel": [ "prev" ], "href": "...?offset=0" }, { "rel": [ "next" ], "href": "...?offset=0" }, { "rel": [ "last" ], "href": "...?offset=0" } ], "actions": [ ] }
Embedded Resource: shipment
Description
A shipment resource contains the address for where items in a transaction grouped by a common shipto were sent.
If you create custom attributes for a shipment, they will automatically be included in the response as embedded resources without having to zoom in on them.
Actions
Properties
Property | Description | Type | Constraints |
---|---|---|---|
address_name | Either the shipto value or Default Shipping Address for non-multiship transactions. |
String | Read only |
first_name | The given name associated with this address. | String | Read only |
last_name | The surname associated with this address. | String | Read only |
company | The company associated with this address. | String | Read only |
address1 | The first line of the street address. | String | Read only |
address2 | The second line of the street address. | String | Read only |
city | The city of this address. | String | Read only |
region | The two character code for states in the United States. Other countries may call this a province. When a two character code isn't available, the full region name will be used. | String | Read only |
postal_code | The postal code of this address. | String | Read only |
country | The country code of this address. | String | Read only |
phone | The phone of this address. | String | Read only |
shipping_service_id | The shipping service id selected during checkout. This will normally correspond with a shipping_service from one of the shipping_methods available. |
Integer | Read only |
shipping_service_description | The description of the shipping service selected for this shipment. | String | Read only |
total_item_price | The total price of the items in this shipment. | Decimal | Read only |
total_tax | The total tax on the items in this shipment. | Decimal | Read only |
total_shipping | The total shipping cost of the items in this shipment. | Decimal | Read only |
total_price | The total price of this shipment. | Decimal | Read only |
date_created | The date this resource was created. | Date | Read only |
date_modified | The date this resource was last modified. | Date | Read only |
Example Representation
{ "_links": { "curies": [ { "name": "fx", "href": "https://api.foxycart.com/rels/{rel}", "templated": true } ], "self": { "href": "https://api-sandbox.foxycart.com/transactions/3844264/shipment", "title": "This Shipment" }, "fx:store": { "href": "https://api-sandbox.foxycart.com/stores/66", "title": "This Store" }, "fx:items": { "href": "https://api-sandbox.foxycart.com/transactions/3844264/items", "title": "Items in this shipment" }, "fx:transaction": { "href": "https://api-sandbox.foxycart.com/transactions/3844264", "title": "This Transaction" }, "fx:shipments": { "href": "https://api-sandbox.foxycart.com/transactions/3844264/shipments", "title": "Shipments for this Transaction" }, "fx:customer": { "href": "https://api-sandbox.foxycart.com/customers/47556", "title": "This Customer" }, "fx:customer_address": { "href": "https://api-sandbox.foxycart.com/customers/47556/default_shipping_address", "title": "This Customer Address" } }, "address_name": "Default Shipping Address", "first_name": "John", "last_name": "Doe", "company": "", "address1": "1234 Anystreet", "address2": "", "city": "NASHVILLE", "region": "TN", "postal_code": "37211", "country": "US", "phone": "555-555-55555", "shipping_service_id": 55, "shipping_service_description": "FedEx Home Delivery", "total_item_price": 10, "total_tax": 1.99, "total_shipping": 11.29, "total_price": 23.28, "date_created": "2015-04-15T08:46:39-0700", "date_modified": "2015-04-15T08:46:39-0700" }
<?xml version="1.0" encoding="UTF-8"?> <resource href="https://api-sandbox.foxycart.com/transactions/3844264/shipment" rel="https://api.foxycart.com/rels/shipment"> <link rel="self" href="https://api-sandbox.foxycart.com/transactions/3844264/shipment" title="This Shipment"/> <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/66" title="This Store"/> <link rel="https://api.foxycart.com/rels/items" href="https://api-sandbox.foxycart.com/transactions/3844264/items" title="Items in this shipment"/> <link rel="https://api.foxycart.com/rels/transaction" href="https://api-sandbox.foxycart.com/transactions/3844264" title="This Transaction"/> <link rel="https://api.foxycart.com/rels/shipments" href="https://api-sandbox.foxycart.com/transactions/3844264/shipments" title="Shipments for this Transaction"/> <link rel="https://api.foxycart.com/rels/customer" href="https://api-sandbox.foxycart.com/customers/47556" title="This Customer"/> <link rel="https://api.foxycart.com/rels/customer_address" href="https://api-sandbox.foxycart.com/customers/47556/default_shipping_address" title="This Customer Address"/> <address_name>Default Shipping Address</address_name> <first_name>John</first_name> <last_name>Doe</last_name> <company></company> <address1>1234 Anystreet</address1> <address2></address2> <city>NASHVILLE</city> <region>TN</region> <postal_code>37211</postal_code> <country>US</country> <phone>555-555-55555</phone> <shipping_service_id>55</shipping_service_id> <shipping_service_description>FedEx Home Delivery</shipping_service_description> <total_item_price>10</total_item_price> <total_tax>1.99</total_tax> <total_shipping>11.29</total_shipping> <total_price>23.28</total_price> <date_created>2015-04-15T08:46:39-0700</date_created> <date_modified>2015-04-15T08:46:39-0700</date_modified> </resource>
{ "class": [ "shipment" ], "properties": { "address_name": "Default Shipping Address", "first_name": "John", "last_name": "Doe", "company": "", "address1": "1234 Anystreet", "address2": "", "city": "NASHVILLE", "region": "TN", "postal_code": "37211", "country": "US", "phone": "555-555-55555", "shipping_service_id": 55, "shipping_service_description": "FedEx Home Delivery", "total_item_price": 10, "total_tax": 1.99, "total_shipping": 11.29, "total_price": 23.28, "date_created": "2015-04-15T08:46:39-0700", "date_modified": "2015-04-15T08:46:39-0700" }, "links": [ { "rel": [ "self" ], "href": "https://api-sandbox.foxycart.com/transactions/3844264/shipment" }, { "rel": [ "https://api.foxycart.com/rels/store" ], "href": "https://api-sandbox.foxycart.com/stores/66" }, { "rel": [ "https://api.foxycart.com/rels/items" ], "href": "https://api-sandbox.foxycart.com/transactions/3844264/items" }, { "rel": [ "https://api.foxycart.com/rels/transaction" ], "href": "https://api-sandbox.foxycart.com/transactions/3844264" }, { "rel": [ "https://api.foxycart.com/rels/shipments" ], "href": "https://api-sandbox.foxycart.com/transactions/3844264/shipments" }, { "rel": [ "https://api.foxycart.com/rels/customer" ], "href": "https://api-sandbox.foxycart.com/customers/47556" }, { "rel": [ "https://api.foxycart.com/rels/customer_address" ], "href": "https://api-sandbox.foxycart.com/customers/47556/default_shipping_address" } ] }
Zoomable Resources
The following related resources can be embedded within this resource by including a ?zoom=<child_resource>
parameter. You can also filter by child resources by ?child_resource:property=<property_value>