Definitions

Packing Slips and Shipments

Read Actions

Packing Slips

Packing Slip Listing

Retrieves a paginated unfiltered list of all account packing slips

POST https://api-pub.stitchlabs.com/v2/PackingSlips
{
  "action": "read"
}

Packing Slip Listing Pagination

Retrieves a paginated unfiltered list of all account packing slips beginning at a specified page offset

POST https://api-pub.stitchlabs.com/v2/PackingSlips
{
    "action": "read",
    "page_size": 15,
    "page_num": 1
}

Packing Slip Listing Sorting

Retrieves a paginated unfiltered list of all account packing slips sorted by a set of request criteria

POST https://api-pub.stitchlabs.com/v2/PackingSlips
{
    "action": "read",
    "sort": [
        {
            "created_at": "desc"
        }
    ]
}
Sortable Attributes for Packing Slips
  • created_at
  • id
  • local_id
  • packing_slip_date
  • ship_date
  • status
  • updated_at
  • void

Packing Slips Listing Filters

Retrieves a paginated list of all account packing slips filtered by a set of request criteria. Applying a filter allows your application to limit listing requests by object values.

POST https://api-pub.stitchlabs.com/v2/PackingSlips
{
    "action": "read",
    "filter": {
        "and": [
            {
                "archived": "0"
            },
            {
                "created_at": "2015-01-01",
                "operation": ">="
            }
        ]
    }
}

Note There can only be one filter per request. There should only be at most 2 AND/OR conditionals in each filter statement. Each conditional can have as many sub-filters as necessary.

Filterable Attributes for Packing Slip
  • created_at
  • id
  • local_id
  • packing_slip_date
  • ship_date
  • status
  • updated_at
  • void

Packing Slip Detail

Retrieves a detailed packing slip record

POST https://api-pub.stitchlabs.com/v2/PackingSlips
{
    "action": "read",
    "PackingSlips": [
        {
            "id": 277142949
        }
    ]
}

Write Actions

Creating a Packing Slip

Creates a packing slip record for a sales order

POST https://api-pub.stitchlabs.com/v1/PackingSlips
{
  "action": "write",
  "PackingSlips": [
    {
      "packing_slip_date": "2015-03-22T08:00:00+0000",
      "notes": "notes go here",
      "links": {
        "Addresses": [
          {
            "id": "1718"
          }
        ],
        "Contacts": [
          {
            "id": "873"
          }
        ],
        "LineItems": [
          {
            "id": "25736",
            "quantity": "1"
          }
        ],
        "SalesOrders": [
          {
            "id": 4733
          }
        ]
      }
    }
  ]
}

Editing Packing Slips

Update packing slip record attributes

POST https://api-pub.stitchlabs.com/v1/PackingSlips
{
    "action": "write",
    "PackingSlips": [
        {
            "id": 277142949,
            "packing_slip_date": "2015-03-11T07:00:00+0000"
        }
    ]
}

Deleting a Packing Slip

Mark a packing slip record as deleted

POST https://api-pub.stitchlabs.com/v1/PackingSlips
{
    "action": "write",
    "PackingSlips": [
        {
            "id": 277142949,
            "delete": 1
        }
    ]
}

Write Actions

Creating a Shipments

Creates a shipment record for a sales order

POST https://api-pub.stitchlabs.com/v1/Packages
{
    "action": "write",
    "Packages": [
        {
            "ship_date": "2015-03-22T08:00:00+0000",
            "notes": "notes go here",
            "tracking_link": "http://google.com",
            "tracking_number": "123123123",
            "cost": "50",
            "delivered": "0",
            "links": {
                "PackingSlips": [
                    {
                        "id": "94"
                    }
                ],
                "PackageCarrierTypes": [
                    {
                        "id": "51"
                    }
                ],
                "SalesOrders": [
                    {
                        "id": "4845"
                    }
                ]
            }
        }
    ]
}

Editing Shipments

Update shipment record attributes

POST https://api-pub.stitchlabs.com/v1/Packages
{
    "action": "write",
    "Packages": [
        {
            "id": 2,
            "ship_date": "2015-03-11T07:00:00+0000"
        }
    ]
}

Deleting a Shipments

Mark a shipment record as deleted

POST https://api-pub.stitchlabs.com/v1/Packages
{
    "action": "write",
    "Packages": [
        {
            "id": 4268,
            "delete": 1
        }
    ]
}