GET /v2/orders

You can list all orders or a subset of them with specific parameters (see below). The orders are returned sorted by ID in descending order.

Restrictions

  • Only created_at or ordered_at may be used at a time in a query, not both at the same time.
  • When using the starting_after (see Pagination) parameter alone, using only lt or lte (indicating a timestamp less than or equal to the specified value), for created_at or ordered_at will result in an error. For example:
    • Only having created_at[lt] and starting_after will cause error
    • Having created_at[lt], created_at[gt] and starting_after is acceptable and won't cause an error.
  • When using the ending_before (see Pagination) parameter alone, using only gt or gte (indicating a timestamp greater than or equal to the specified value), for created_at or ordered_at will result in an error. For example:
    • Only having created_at[gt] and ending_before will cause error
    • Having created_at[lt], created_at[gt] and ending_before is acceptable and won't cause an error.

Parameters:

PARAMETERDESCRIPTION
email
string, optional
Only return the orders with this email
order_number
string, optional
Only return the orders with this order number.
created_at
datetime or object, optional
A filter on the list based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be an object with the following options:
created_at[gt]: created_at field is greater than this value
created_at[gte]: created_at field is greater than or equal to this value
created_at[lt]: created_at field is less than this value
created_at[lte]: created_at field is less than or equal to this value
ordered_at
datetime or object, optional
A filter on the list based on the object ordered_at field. The value can be a string with an integer Unix timestamp, or it can be an object with the following options:
ordered_at[gt]: ordered_at field is greater than this value
ordered_at[gte]: ordered_at field is greater than or equal to this value
ordered_at[lt]: ordered_at field is less than this value
ordered_at[lte]: ordered_at field is less than or equal to this value
curl --location -g --request GET "https://api.shipup.co/v2/orders?expand[]=shipping_address&expand[]=line_items&expand[]=notifications.notification_payloads&expand[]=notifications.notification_type&expand[]=fulfillments.trackers.line_items&expand[]=fulfillments.trackers.events.address&expand[]=fulfillments.trackers.carrier&expand[]=fulfillments.shipping_address&expand[]=fulfillments.line_items" \
--header "Authorization: ${PRIVATE_KEY}" \
--header "Content-Type: application/json"
// status
200

//body
{
  "object": "list",
  "data": [
    {
      "object": "order",
      "id": 34567,
      "canceled": false,
      "created_at": null,
      "custom_variables": null,
      "email": "[email protected]",
      "first_name": "Héloise",
      "language_code": "fr",
      "last_name": null,
      "merchant_id": "ORDER_M_ID_34567",
      "mute_notifications": false,
      "order_number": "ORDER_NUMBER_34567",
      "ordered_at": 1599403980,
      "phone": null,
      "updated_at": null,
      "uuid": "d7431d29-db7b-4bdd-aaef-5574c0d0109a",
      "fulfillments": {
        "object": "list",
        "data": [
          {
            "object": "fulfillment",
            "id": 34568,
            "created_at": null,
            "custom_variables": null,
            "estimated_delivery_range_end": null,
            "estimated_delivery_range_start": null,
            "fulfillment_number": "FULFILLMENT_NUMBER_2_34567",
            "merchant_id": "FULFILLMENT_M_ID_2_34567",
            "status_code": "shipped",
            "updated_at": null,
            "uuid": "bc2eb67f-8364-4bbc-9457-304df353b152",
            "line_items": {
              "object": "list",
              "data": [

              ]
            },
            "shipping_address": {
              "object": "address",
              "id": 34567,
              "address1": "57 rue de Varenne",
              "address2": null,
              "city": "Paris",
              "comment": null,
              "company_title": null,
              "country": "France",
              "country_code": "FR",
              "first_name": "Jane",
              "last_name": "Doe",
              "name": "Jane Doe",
              "state": null,
              "zip": "75007"
            },
            "trackers": {
              "object": "list",
              "data": [
                {
                  "object": "tracker",
                  "id": 34568,
                  "created_at": 1599403980,
                  "custom_variables": null,
                  "delivered_at": 1599403980,
                  "delivery_status_code": "delivered",
                  "displayable_expected_delivery_date": null,
                  "displayable_expected_delivery_datetime": null,
                  "displayable_expected_delivery_kind": null,
                  "first_delivery_attempted_at": null,
                  "mute_notifications": false,
                  "shipped_at": null,
                  "tracking_link": "https://mydhl.express.dhl/fr/fr/tracking.html#/results?id=ABCD_2_34567",
                  "tracking_number": "ABCD_2_34567",
                  "untracked_carrier_name": null,
                  "untracked_carrier_url": null,
                  "updated_at": null,
                  "uuid": "70ec1514-c608-4ae1-a4c3-26329e68ad43",
                  "carrier": {
                    "object": "carrier",
                    "code": "dhl",
                    "name": "DHL Express"
                  },
                  "carrier_service": {
                    "object": "carrier_service",
                    "id": 34568,
                    "code": "dhl_green",
                    "name": "DHL Green"
                  },
                  "events": {
                    "object": "list",
                    "data": [
                      {
                        "object": "event",
                        "id": 34570,
                        "event_type_code": "delivered",
                        "happened_at": 1599403980,
                        "message": "Delivered",
                        "raw": "{:matcher=>\"Delivered\", :date=>Sun, 06 Sep 2020 14:53:00 +0000}",
                        "messages": {
                          "en": "Livré",
                          "fr": "Livré"
                        },
                        "address": null
                      },
                      {
                        "object": "event",
                        "id": 34569,
                        "event_type_code": "origin_scan",
                        "happened_at": 1599403980,
                        "message": "Package received",
                        "raw": "{:message=>\"Package received\", :date=>Sun, 06 Sep 2020 14:53:00 +0000}",
                        "messages": {
                          "en": "Scan d'origine",
                          "fr": "Scan d'origine"
                        },
                        "address": null
                      }
                    ]
                  },
                  "notifications": {
                    "object": "list",
                    "data": [

                    ]
                  },
                  "line_items": {
                    "object": "list",
                    "data": [
                      {
                        "object": "line_item",
                        "id": 34571,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1599403980,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_8",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_8",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1599403980,
                        "variant_title": null
                      },
                      {
                        "object": "line_item",
                        "id": 34570,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1599403980,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_7",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_7",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1599403980,
                        "variant_title": null
                      },
                      {
                        "object": "line_item",
                        "id": 34569,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1599403980,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_6",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_6",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1599403980,
                        "variant_title": null
                      }
                    ]
                  },
                  "claims": {
                    "object": "list",
                    "data": [

                    ]
                  }
                }
              ]
            },
            "notifications": {
              "object": "list",
              "data": [

              ]
            }
          },
          {
            "object": "fulfillment",
            "id": 34567,
            "created_at": null,
            "custom_variables": null,
            "estimated_delivery_range_end": null,
            "estimated_delivery_range_start": null,
            "fulfillment_number": "FULFILLMENT_NUMBER_1_34567",
            "merchant_id": "FULFILLMENT_M_ID_1_34567",
            "status_code": "shipped",
            "updated_at": null,
            "uuid": "c3a7327c-2453-49b2-ad48-b13c00ef1285",
            "line_items": {
              "object": "list",
              "data": [

              ]
            },
            "shipping_address": {
              "object": "address",
              "id": 34567,
              "address1": "57 rue de Varenne",
              "address2": null,
              "city": "Paris",
              "comment": null,
              "company_title": null,
              "country": "France",
              "country_code": "FR",
              "first_name": "Jane",
              "last_name": "Doe",
              "name": "Jane Doe",
              "state": null,
              "zip": "75007"
            },
            "trackers": {
              "object": "list",
              "data": [
                {
                  "object": "tracker",
                  "id": 34567,
                  "created_at": 1599403980,
                  "custom_variables": null,
                  "delivered_at": null,
                  "delivery_status_code": "in_transit",
                  "displayable_expected_delivery_date": null,
                  "displayable_expected_delivery_datetime": null,
                  "displayable_expected_delivery_kind": null,
                  "first_delivery_attempted_at": null,
                  "mute_notifications": false,
                  "shipped_at": null,
                  "tracking_link": "https://www.ups.com/WebTracking/processInputRequest?loc=fr_FR&tracknum=ABCD_1_34567",
                  "tracking_number": "ABCD_1_34567",
                  "untracked_carrier_name": null,
                  "untracked_carrier_url": null,
                  "updated_at": null,
                  "uuid": "3338fedb-7ff8-4271-8fa7-579df9857f68",
                  "carrier": {
                    "object": "carrier",
                    "code": "ups",
                    "name": "UPS"
                  },
                  "carrier_service": {
                    "object": "carrier_service",
                    "id": 34567,
                    "code": "ups_intl",
                    "name": "UPS International"
                  },
                  "events": {
                    "object": "list",
                    "data": [
                      {
                        "object": "event",
                        "id": 34568,
                        "event_type_code": null,
                        "happened_at": 1599403980,
                        "message": "Out for delivery",
                        "raw": "{:matcher=>\"Out for delivery\", :date=>Sun, 06 Sep 2020 14:53:00 +0000}",
                        "messages": {
                          "en": "Out for delivery",
                          "fr": "Out for delivery"
                        },
                        "address": null
                      },
                      {
                        "object": "event",
                        "id": 34567,
                        "event_type_code": "origin_scan",
                        "happened_at": 1599403980,
                        "message": "Package received",
                        "raw": "{:message=>\"Package received\", :date=>Sun, 06 Sep 2020 14:53:00 +0000}",
                        "messages": {
                          "en": "Scan d'entrée",
                          "fr": "Scan d'entrée"
                        },
                        "address": null
                      }
                    ]
                  },
                  "notifications": {
                    "object": "list",
                    "data": [

                    ]
                  },
                  "line_items": {
                    "object": "list",
                    "data": [
                      {
                        "object": "line_item",
                        "id": 34568,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1599403980,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_5",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_5",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1599403980,
                        "variant_title": null
                      },
                      {
                        "object": "line_item",
                        "id": 34567,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1599403980,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_4",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_4",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1599403980,
                        "variant_title": null
                      }
                    ]
                  },
                  "claims": {
                    "object": "list",
                    "data": [

                    ]
                  }
                }
              ]
            },
            "notifications": {
              "object": "list",
              "data": [

              ]
            }
          }
        ]
      },
      "line_items": {
        "object": "list",
        "data": [

        ]
      },
      "notifications": {
        "object": "list",
        "data": [

        ]
      },
      "shipping_address": {
        "object": "address",
        "id": 34567,
        "address1": "57 rue de Varenne",
        "address2": null,
        "city": "Paris",
        "comment": null,
        "company_title": null,
        "country": "France",
        "country_code": "FR",
        "first_name": "Jane",
        "last_name": "Doe",
        "name": "Jane Doe",
        "state": null,
        "zip": "75007"
      }
    },
    {
      "object": "order",
      "id": 23456,
      "canceled": false,
      "created_at": null,
      "custom_variables": null,
      "email": "[email protected]",
      "first_name": "Héloise",
      "language_code": "fr",
      "last_name": null,
      "merchant_id": "ORDER_M_ID_23456",
      "mute_notifications": false,
      "order_number": "ORDER_NUMBER_23456",
      "ordered_at": 1570906800,
      "phone": null,
      "updated_at": null,
      "uuid": "099c4d5c-72d5-4803-b546-4dd3fd8f5d90",
      "fulfillments": {
        "object": "list",
        "data": [
          {
            "object": "fulfillment",
            "id": 23456,
            "created_at": null,
            "custom_variables": null,
            "estimated_delivery_range_end": null,
            "estimated_delivery_range_start": null,
            "fulfillment_number": "FULFILLMENT_NUMBER_1_23456",
            "merchant_id": "FULFILLMENT_M_ID_1_23456",
            "status_code": "shipped",
            "updated_at": null,
            "uuid": "8929dc7c-0a59-419d-818b-884494e7b2f8",
            "line_items": {
              "object": "list",
              "data": [

              ]
            },
            "shipping_address": {
              "object": "address",
              "id": 23456,
              "address1": "39 rue Beauregard",
              "address2": null,
              "city": "Paris",
              "comment": null,
              "company_title": null,
              "country": "France",
              "country_code": "FR",
              "first_name": "John",
              "last_name": "Doe",
              "name": "John Doe",
              "state": null,
              "zip": "75002"
            },
            "trackers": {
              "object": "list",
              "data": [
                {
                  "object": "tracker",
                  "id": 23456,
                  "created_at": 1570906800,
                  "custom_variables": null,
                  "delivered_at": null,
                  "delivery_status_code": "in_transit",
                  "displayable_expected_delivery_date": null,
                  "displayable_expected_delivery_datetime": null,
                  "displayable_expected_delivery_kind": null,
                  "first_delivery_attempted_at": null,
                  "mute_notifications": false,
                  "shipped_at": null,
                  "tracking_link": "http://www.laposte.fr/outils/suivre-vos-envois?code=ABCD_1_23456",
                  "tracking_number": "ABCD_1_23456",
                  "untracked_carrier_name": null,
                  "untracked_carrier_url": null,
                  "updated_at": null,
                  "uuid": "945a80f1-24f3-4625-996f-2359dca782e0",
                  "carrier": {
                    "object": "carrier",
                    "code": "colissimo",
                    "name": "Colissimo"
                  },
                  "carrier_service": {
                    "object": "carrier_service",
                    "id": 23456,
                    "code": "colissimo_express",
                    "name": "Colissimo Express"
                  },
                  "events": {
                    "object": "list",
                    "data": [
                      {
                        "object": "event",
                        "id": 23457,
                        "event_type_code": null,
                        "happened_at": 1570906800,
                        "message": "Out for delivery",
                        "raw": "{:matcher=>\"Out for delivery\", :date=>Sat, 12 Oct 2019 19:00:00 +0000}",
                        "messages": {
                          "en": "Out for delivery",
                          "fr": "Out for delivery"
                        },
                        "address": null
                      },
                      {
                        "object": "event",
                        "id": 23456,
                        "event_type_code": "origin_scan",
                        "happened_at": 1570906800,
                        "message": "Package received",
                        "raw": "{:message=>\"Package received\", :date=>Sat, 12 Oct 2019 19:00:00 +0000}",
                        "messages": {
                          "en": "Origin Scan",
                          "fr": "Colis scanné"
                        },
                        "address": null
                      }
                    ]
                  },
                  "notifications": {
                    "object": "list",
                    "data": [

                    ]
                  },
                  "line_items": {
                    "object": "list",
                    "data": [
                      {
                        "object": "line_item",
                        "id": 23458,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1570906800,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_3",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_3",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1570906800,
                        "variant_title": null
                      },
                      {
                        "object": "line_item",
                        "id": 23457,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1570906800,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_2",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_2",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1570906800,
                        "variant_title": null
                      },
                      {
                        "object": "line_item",
                        "id": 23456,
                        "canceled": null,
                        "canceled_quantity": null,
                        "created_at": 1570906800,
                        "custom_variables": null,
                        "description": null,
                        "merchant_id": "LINE_ITEM_M_UNFULFILLED_ID_1",
                        "name": null,
                        "quantity": null,
                        "requires_shipping": null,
                        "shipped_quantity": null,
                        "sku": "LINE_ITEM_UNFULFILLED_SKU_1",
                        "thumbnail": {
                          "src": "https://imgurl.com/foo.jpg",
                          "width": "300",
                          "height": "100"
                        },
                        "title": null,
                        "updated_at": 1570906800,
                        "variant_title": null
                      }
                    ]
                  },
                  "claims": {
                    "object": "list",
                    "data": [

                    ]
                  }
                }
              ]
            },
            "notifications": {
              "object": "list",
              "data": [

              ]
            }
          }
        ]
      },
      "line_items": {
        "object": "list",
        "data": [

        ]
      },
      "notifications": {
        "object": "list",
        "data": [
          {
            "object": "notification",
            "id": 23456,
            "created_at": 1570906800,
            "language_code": "fr",
            "notification_payloads": {
              "object": "list",
              "data": [
                {
                  "object": "notification_payload",
                  "id": 23456,
                  "created_at": 1570906800,
                  "dispatched": false,
                  "status": "built",
                  "error": null,
                  "type": "email",
                  "support_cced": null
                }
              ]
            },
            "notification_type": {
              "object": "notification_type",
              "id": 23456,
              "name": "Order placed",
              "category": "pre_shipment",
              "description": "Order was just placed by the customer. This notification will be sent when Shipup receives an order. If the order was placed more than 36 hours prior it is imported in Shipup, this notification will not be sent",
              "slug": "order_placed"
            }
          }
        ]
      },
      "shipping_address": {
        "object": "address",
        "id": 23456,
        "address1": "39 rue Beauregard",
        "address2": null,
        "city": "Paris",
        "comment": null,
        "company_title": null,
        "country": "France",
        "country_code": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "name": "John Doe",
        "state": null,
        "zip": "75002"
      }
    }
  ],
  "has_more": true
}