plans

Endpoint to take in order and item information from a partner, and generated the best shipment plan based on their configured fulfillment network.

Changed on
post/api/v1/fe/plans

Request

Request body

partnerPlanIdstring

Optional Id which allows partners to set their own Id for looking up the plan after creation.

asOfDateTimestring date-time

Date used to re-create a plan as of a certain point in time. This parameter will prevent the use of caching for this request. The most common use case is to provide null which represents 'now'.

assumeQuantityAvailableInfiniteboolean

When true, planning assumes infinite inventory. Scope is the fulfillment contexts referenced by fulfillmentCenters when that field is non-empty; otherwise all of the partner's contexts. In the all-contexts case omit productDetails — this flag already assumes every product is infinite everywhere; to supply per-product attributes (e.g. dimensions or weight) set assumeQuantityAvailableInfinite on each ProductDetail instead, which keeps those attributes. When a fulfillmentCenters scope is supplied, productDetails may still carry inventoryStatuses describing OTHER (non-scope) contexts. Defaults to false/null.

planDateTimestring date-time

Future date to use as the starting date of the plan. A value of null conveys to use 'now' as the plan time.

namestring

Optional short form name for the generated plan. Used to give the plans human readable attributes to help identify plans in UIs and spread sheets.

descriptionstring

Optional long form information for the generated plan.

tenantIdstring

Either the shipium tenant ID or the partner provided tenant ID. When present, this is used to indicate the tenant associated with the plan.

Example request

{
  "orders": [
    {
      "partnerOrderId": "myCustomPartnerOrderId123",
      "orderedDateTime": "2019-10-28T14:34:55.123456Z",
      "currencyCode": "usd",
      "desiredDeliveryDate": "2019-10-31T20:00:00Z",
      "businessDaysOfTransit": 3,
      "shipOption": "Standard",
      "shippedDateTime": "2019-10-29T09:12:33.123456Z",
      "destinationAddress": {
        "name": "Wile E. Coyote",
        "company": "ACME",
        "street1": "123 Main St.",
        "street2": "Suite 42",
        "city": "Albuquerque",
        "region": "NM",
        "countryCode": "US",
        "postalCode": "\"87121\"",
        "addressType": "commercial"
      },
      "orderItemQuantities": [
        {
          "productId": "RN03947--Z43121"
        }
      ],
      "packagingType": {
        "linearDimensions": {
          "linearUnit": "in",
          "length": 13,
          "width": 12,
          "height": 10
        },
        "weight": {
          "weightUnit": "lb",
          "weight": 50
        },
        "maxContentWeight": {
          "weightUnit": "lb",
          "weight": 50
        }
      }
    }
  ],
  "productDetails": [
    {
      "linearDimensions": {
        "linearUnit": "in",
        "length": 13,
        "width": 12,
        "height": 10
      },
      "weight": {
        "weightUnit": "lb",
        "weight": 50
      },
      "hazmatInfo": {
        "category": "defined",
        "quantity": 2.1,
        "quantityType": "gross",
        "quantityUnits": "l",
        "containerType": "aluminum_jerrican",
        "hazmatId": "UN1755",
        "properShippingName": "Chromic Acid Solution",
        "packingGroup": "II",
        "transportMode": "passenger_and_cargo_aircraft",
        "packingInstructionCode": "967",
        "hazardClass": "class_8_corrosive_material",
        "subsidiaryClasses": [
          "8.1"
        ],
        "numberOfInnerPackagings": 2,
        "innerPackagingType": "glass bottle",
        "outerPackagingType": "fiberboard box",
        "shipperDeclarationStatement": "LQ_air",
        "wattHours": 100,
        "lithiumContent": 1.5,
        "numberOfCells": 4,
        "numberOfBatteries": 2,
        "batteryConfiguration": "packed_with_equipment"
      }
    }
  ],
  "packagingTypes": [
    {
      "linearDimensions": {
        "linearUnit": "in",
        "length": 13,
        "width": 12,
        "height": 10
      },
      "weight": {
        "weightUnit": "lb",
        "weight": 50
      },
      "maxContentWeight": {
        "weightUnit": "lb",
        "weight": 50
      }
    }
  ],
  "fulfillmentCenters": [
    {
      "packagingTypes": [
        {
          "linearDimensions": {
            "linearUnit": "in",
            "length": 13,
            "width": 12,
            "height": 10
          },
          "weight": {
            "weightUnit": "lb",
            "weight": 50
          },
          "maxContentWeight": {
            "weightUnit": "lb",
            "weight": 50
          }
        }
      ]
    }
  ]
}

Response

Details on plan, shipment candidates calculated.

partnerIdstring

Unique id of the partner.

urnstring

The uniform resource name for identifying this fe asset. The format is `urn:fe:<asset-name>:<assetId>:<version>

namestring

The human readable name describing this fe asset.

descriptionstring

Extra explanatory information about this fe asset.

activeboolean

Indication of whether this fe asset is active.

archivedboolean

Indication of whether this fe asset is archived.

planIdstring required

Unique id of the plan generated by Shipium.

partnerPlanIdstring

Optional Id allowing partners to set their own Id for looking up plans.

resultingInventoryobject required

Status of inventory after inventory assigned for use in proposed shipments. productId -> ProductInventoryStatus

requestTenantIdstring

Either the shipium tenant ID or the partner provided tenant ID. When present, this is the tenant Id sent on the request.

shipiumTenantIdstring

The shipium generated tenant ID. When present, this is used to indicate the tenant associated with the plan.

partnerTenantIdstring

The partner provided tenant ID. When present, this is used to indicate the tenant associated with the plan.

assumeQuantityAvailableInfiniteboolean

Echoes the request-level assumeQuantityAvailableInfinite when it was submitted as true. Purely diagnostic — it lets a plan be interpreted from its response alone. Mirrors the tenant echo.

Example response

{
  "urn": "urn:fe:global-config:FE91F3A8-6838-469A-B9F8-2D82127573DC:1",
  "auditInfo": {
    "version": 1
  },
  "proposedShipments": [
    {
      "cost": {
        "performance": {
          "estimatedDeliveryDateLocal": "2007-12-03T10:15:30"
        }
      },
      "destinationAddress": {
        "name": "Wile E. Coyote",
        "company": "ACME",
        "street1": "123 Main St.",
        "street2": "Suite 42",
        "city": "Albuquerque",
        "region": "NM",
        "countryCode": "US",
        "postalCode": "\"87121\"",
        "addressType": "commercial"
      },
      "packagingType": {
        "linearDimensions": {
          "linearUnit": "in",
          "length": 13,
          "width": 12,
          "height": 10
        },
        "weight": {
          "weightUnit": "lb",
          "weight": 50
        },
        "maxContentWeight": {
          "weightUnit": "lb",
          "weight": 50
        }
      },
      "shipmentItems": [
        {
          "productId": "RN03947--Z43121",
          "linearDimensions": {
            "linearUnit": "in",
            "length": 13,
            "width": 12,
            "height": 10
          },
          "weight": {
            "weightUnit": "lb",
            "weight": 50
          }
        }
      ],
      "totalWeight": {
        "weightUnit": "lb",
        "weight": 50
      }
    }
  ],
  "unfulfillableItems": [
    {
      "orderItem": {
        "productId": "RN03947--Z43121"
      }
    }
  ]
}

Changes