Abandoned Carts

Here is the documentation to access the abandoned carts via our API.

GET /carts/abandoned

This method will return all the abandoned carts with a paging limit of 25 and a default offset of 0.

Resource URL

GET https://app.snipcart.com/api/carts/abandoned

Headers

Name Value Required? Description
Accept application/json Yes Our API only accepts application/json content type, so you must always specify Accept: application/json header in each request you make.

Parameters

Name Required? Type Description
offset No int Number of results to skip. Default is 0.
limit No int Number of results to fetch. Default is 20.
timeRange No string A time range criteria for the collection (values can be: Anytime, LessThan4Hours, LessThanADay, LessThanAWeek, LessThanAMonth).
minimalValue No int You can specify a minimal value to your requests, abandoned carts with a total amount under this value won't be returned.
email No string You can specify an email to your request, abandoned carts with a different email value won't be returned.
productId No string You can specify a product ID to your requests, abandoned carts not containing the associated product won't be returned.

Example request

curl -H "Accept: application/json" \
    https://app.snipcart.com/api/carts/abandoned?offset=0&limit=50&status=LessThan4Hours \
    -u {API_KEY}:

Example response

{
  "minimalValue": null,
  "timeRange": "LessThan4Hours",
  "email": null,
  "productId": null,
  "totalItems": 1,
  "offset": 0,
  "limit": 25,
  "items": [
    {
      "token": "5e6e8393-c02c-4a44-a054-6dc8356bab66",
      "email": "geeks@snipcart.com",
      "mode": "Test",
      "status": "InProgress",
      "shipToBillingAddress": true,
      "billingAddress": {
        "fullName": "Geeks",
        "firstName": null,
        "name": "Geeks",
        "company": "Snipcart",
        "address1": "226 Rue Saint-Joseph Est",
        "address2": "",
        "city": ", Ville de Québec",
        "country": "CA",
        "postalCode": "G1K3A9",
        "province": "QC",
        "phone": "(418)800-7440"
      },
      "modificationDate": "2016-11-08T17:15:12.827Z",
      "shippingAddress": {
        "fullName": "Geeks",
        "firstName": null,
        "name": "Geeks",
        "company": "Snipcart",
        "address1": "226 Rue Saint-Joseph Est",
        "address2": "",
        "city": ", Ville de Québec",
        "country": "CA",
        "postalCode": "G1K3A9",
        "province": "QC",
        "phone": "(418)800-7440"
      },
      "completionDate": null,
      "invoiceNumber": "",
      "shippingInformation": {
        "provider": null,
        "fees": 10,
        "method": "Fast custom shipping"
      },
      "paymentMethod": 0,
      "summary": {
        "subtotal": 20,
        "taxableTotal": 20,
        "total": 30,
        "paymentMethod": 0,
        "taxes": [],
        "adjustedTotal": 30
      },
      "metadata": {},
      "items": [
        {
          "uniqueId": "0fe3b1d4-3334-4d34-9722-a4d59f529190",
          "token": "5e6e8393-c02c-4a44-a054-6dc8356bab66",
          "id": "42",
          "name": "The Geek Shirt",
          "price": 20,
          "description": "Be the coolest geek in town with this awesome shirt.",
          "url": "https://snipcart.com/",
          "image": "http://i.imgur.com/BbCiBGg.png",
          "quantity": 1,
          "minQuantity": null,
          "maxQuantity": null,
          "stackable": true,
          "shippable": true,
          "taxable": true,
          "taxes": [],
          "customFields": [],
          "duplicatable": false,
          "alternatePrices": {},
          "dimensions": {
            "width": null,
            "height": null,
            "length": null,
            "weight": 20
          },
          "unitPrice": 20,
          "totalPrice": 20,
          "addedOn": "2016-11-08T17:15:13.517Z"
        },
        ...
      ],
      "discounts": [],
      "customFields": [],
      "plans": [],
      "refunds": [],
      "currency": "cad",
      "totalWeight": 20,
      "total": 30
    },
    ...
  ]
}

GET /carts/abandoned/{token}

This method will return a particular abandoned cart.

Resource URL

GET https://app.snipcart.com/api/carts/abandoned/{token}

Headers

Name Value Required? Description
Accept application/json Yes Our API only accepts application/json content type, so you must always specify Accept: application/json header in each request you make.

Parameters

Name Required? Type Description
token Yes Guid The order unique token.

Example request

curl -H "Accept: application/json" \
    https://app.snipcart.com/api/carts/abandoned/35cb24c1-00d5-4b26-a16d-4a99bcde8ea3 \
    -u {API_KEY}:

Example response

{
  "token": "35cb24c1-00d5-4b26-a16d-4a99bcde8ea3",
  "email": "fdsfsdfdsfdsfsdfs@gmail.com",
  "mode": "Test",
  "status": "InProgress",
  "shipToBillingAddress": true,
  "billingAddress": {
    "fullName": "Geeks",
    "firstName": null,
    "name": "Geeks",
    "company": "Snipcart",
    "address1": "226 Rue Saint-Joseph Est",
    "address2": "",
    "city": ", Ville de Québec",
    "country": "CA",
    "postalCode": "G1K3A9",
    "province": "QC",
    "phone": "(418)800-7440"
  },
  "modificationDate": "2016-11-08T17:48:23.997Z",
  "shippingAddress": {
    "fullName": "Geeks",
    "firstName": null,
    "name": "Geeks",
    "company": "Snipcart",
    "address1": "226 Rue Saint-Joseph Est",
    "address2": "",
    "city": ", Ville de Québec",
    "country": "CA",
    "postalCode": "G1K3A9",
    "province": "QC",
    "phone": "(418)800-7440"
  },
  "completionDate": null,
  "invoiceNumber": "",
  "shippingInformation": {
    "provider": null,
    "fees": 10,
    "method": "Fast custom shipping"
  },
  "paymentMethod": 0,
  "summary": {
    "subtotal": 20,
    "taxableTotal": 20,
    "total": 30,
    "paymentMethod": 0,
    "taxes": [],
    "adjustedTotal": 30
  },
  "metadata": {},
  "items": [
    {
      "uniqueId": "27ab2f3e-1a03-4b23-9407-65d940b182ea",
      "token": "35cb24c1-00d5-4b26-a16d-4a99bcde8ea3",
      "id": "42",
      "name": "The Geek Shirt",
      "price": 20,
      "description": "Be the coolest geek in town with this awesome shirt.",
      "url": "https://snipcart.com/",
      "image": "http://i.imgur.com/BbCiBGg.png",
      "quantity": 1,
      "minQuantity": null,
      "maxQuantity": null,
      "stackable": true,
      "shippable": true,
      "taxable": true,
      "taxes": [],
      "customFields": [],
      "duplicatable": false,
      "alternatePrices": {},
      "dimensions": {
        "width": null,
        "height": null,
        "length": null,
        "weight": 20
      },
      "unitPrice": 20,
      "totalPrice": 20,
      "addedOn": "2016-11-08T17:48:25.01Z"
    },
    ...
  ],
  "discounts": [],
  "customFields": [],
  "plans": [],
  "refunds": [],
  "currency": "cad",
  "totalWeight": 20,
  "total": 30
}