Shipments

A Shipment represents a successful, single-carton fulfillment of one or more Order Line Items.

Relationships

  • OrderShipments belong to Orders.
  • Shipment LinesShipments can have many Shipment Lines

Operations (Click on an Operation to view requirements, options, & examples)

POST /v1/brands/{brand_id}/shipments/ Create a Shipment
GET /v1/brands/{brand_id}/shipments/{id}/packing_slip/ Generate Packing Slip
GET /v1/brands/{brand_id}/shipments/{id}/shipping_label/ Generate Shipping Label

Fields

idStatic identifier for the Shipment assigned by RevCascade. Should be used in other Shipment API endpoints.
order_idStatic identifier for the Order that owns the Shipment.
carrier

The carrier that is responsible for shipping the items.

"carrier": {
    "id": 1,
    "name": "FedEx",
    "code": "FDEG"
}
shipping_accountThe Shipping account billed for the shipment.
shipping_methodThe shipping method that was used for the shipment.
tracking_numberThe tracking number of the shipment supplied by the carrier.
ship_from_name1Origin Name (Line 1)
ship_from_name2Origin Name (Line 2)
ship_from_street1Origin Street (Line 1)
ship_from_street2Origin Street (Line 2)
ship_from_cityOrigin city.
ship_from_provinceOrigin state or province.
ship_from_postal_codeOrigin postal code.
ship_from_countryTwo-Character Country Code (e.g. US) • Reference
ship_from_phoneOrigin phone number.
ship_weightThe total weight of the carton (in pounds).
ship_widthThe width of the carton (in inches).
ship_lengthThe length of the carton (in inches).
ship_heightThe height of the carton (in inches).
valid_packing_slipBoolean flag that indicates elligibility to generate a packing slip.
valid_shipping_labelBoolean flag that indicates elligibility to generate a shipping label.
shipped_atISO-8601 Timestamp (in UTC)
shipment_lines

An array of Shipment Line Items attached to the Shipment.

{
  "id": "10000",
  "variant": {
      "id": "100084",
      "identifier": "1234",
      "upc": "123456789456",
      ...
  }
  "quantity": 1,
}

id - static id assigned by RevCascade.

variant - The exact item that was shipped.

quantity - The number of items included in the carton.

Back to Top

Examples

POST /v1/brands/{brand_id}/shipments/ Create a Shipment
Input Parameters - All fields required unless otherwise marked.
order_id The unique RevCascade id for the Order.
ship_from_name1 Origin name (Line 1).
ship_from_name2 (optional) Origin name (Line 2).
ship_from_street1 Origin street address (Line 1).
ship_from_street2 (optional) Origin street address (Line 2).
ship_from_city Origin city.
ship_from_province Origin state or province.
ship_from_postal_code Origin postal code.
ship_from_country Two-Character Country Code (e.g. US) • Reference
ship_from_phone (optional) Origin phone number.
shipment_lines

An array of objects representing the items that are in the shipment. Please send one shipment line per unique item.

"shipment_lines": [{
  "variant": {
    "upc": "123456789012",
    "brand_identifier": "rcsample1234",
  }
  "quantity": 1
}]

variant - the item that is included in the shipment.

  • upc - the UPC of the item. Optional if 'brand_indentifer' is passed.

  • brand_identifier - your identifier for the item. Optional if 'upc' is passed.

quantity: The number of items included in the shipment.

Please note...

Either a 'upc' or a 'brand_identifier' is required when creating a shipment line. However, if both are passed, 'upc' will take priority over 'brand_identifier'.

If you have already generated Shipping Labels...
carrier_id

The carrier id according to RevCascade.
Common carrier ids:

  • FedEx = 1
  • UPS = 2
  • USPS = 3

For a complete list of carriers, see the carriers endpoint documentation.

shipping_method_id A valid shipping_method_id. For a complete list of avaible shipping methods, see the carriers endpoint documentation.
tracking_number The carrier tracking number.
If you'd like RevCascade to generate Shipping Labels...
shipping_account_id

The shipping account you want to use to generate a shipping label. Should be a valid id from orders.shipping_accounts.

shipping_method_id

The shipping method you want to use to generate a label. Should be a valid id from orders.shipping_accounts.shipping_methods.

ship_weight The total weight of the carton (in pounds).
ship_width The width of the carton (in inches).
ship_length The length of the carton (in inches).
ship_height The height of the carton (in inches).

Create a shipment that already has a tracking number using FedEx Ground.

POST https://api.revcascade.com/v1/brands/500/shipments/
{
    "order_id": 1002,
    "ship_from_name1": "Michael Starr",
    "ship_from_street1": "1332 Hermosa Ave.",
    "ship_from_street2": "Suite #14",
    "ship_from_city": "Hermosa Beach",
    "ship_from_province": "CA",
    "ship_from_postal_code": "90254",
    "ship_from_country": "US",
    "ship_from_phone": "(310) 867-5309",
    "shipped_at": "2016-03-10 10:00:00",
    "carrier_id": 1,
    "shipping_method_id": 3,
    "tracking_number": "1234567890",
    "shipment_lines": [{
      "variant": {
        "brand_identifier": "rcsample1234",
      },
      "quantity": 1
    }]
}

Create a shipment that requires a shipping label and tracking number.

POST https://api.revcascade.com/v1/brands/500/shipments/
{
    "order_id": 1002,
    "ship_from_name1": "Michael Diamond",
    "ship_from_name2": "c/o Metal Shop",
    "ship_from_street1": "1332 Hermosa Ave.",
    "ship_from_street2": "Suite #14",
    "ship_from_city": "Hermosa Beach",
    "ship_from_province": "CA",
    "ship_from_postal_code": "90254",
    "ship_from_country": "US",
    "ship_from_phone": "(310) 867-5309",
    "shipping_account_id": 1582,
    "shipping_method": 12973,
    "ship_weight": 1.0,
    "ship_width": 12.75,
    "ship_length": 6,
    "ship_height": 10.5,
    "shipment_lines": [{
        "variant": {
          "upc": "123456789012",
          "brand_identifier": "rcsample1234"
        },
        "quantity": 1
    }]
}

Back to Top

GET /v1/brands/{brand_id}/shipments/{id}/packing_slip/ Generate Packing Slip

Generate and retrieve a packing slip for a shipment.

GET https://api.revcascade.com/v1/brands/500/shipments/50000/packing_slip/

Back to Top

GET /v1/brands/{brand_id}/shipments/{id}/shipping_label/ Generate Shipping Label

Generate and retrieve a label for a shipment.

GET https://api.revcascade.com/v1/brands/500/shipments/50000/shipping_label/

Please Note: This endpoint will only return a shipping label if the shipment was created with ship_weight, ship_width, ship_height & ship_length specified. To check if the Shipment is elligible for a shipping label, check the valid_shipping_label field on the Shipment before making request to generate the label.

Back to Top