top of page

Perseuss comes with an HTTPS REST API that developers can use to add cartonization functionality into their applications.

Every successful cartonization response will contain a visualization link that allows the user to explore the solution in detail.

 

This link can be embedded in other applications via HTML iFrames, like this: 

 

To get started, you will need an API Key. To get one, please email tom@getperseuss.com 

Once you have an API Key, you can try out the API by sending POST requests to https://backend.perseuss.xyz/post-cartonization-v2 using the schema below.

{
        "api_key": "
SEND_EMAIL_FOR_API_KEY",
        "max_runtime_seconds": 5.0,

        "optimization_config": {
            "fill_rate": 0.95,
            "allowed_boxes": [
                {
                    "box_name": "9x12x4",
                    "length_inches": 9,
                    "width_inches": 12,
                    "height_inches": 4,
                    "box_weight_lbs": 0.4,
                    "box_cost_usd": 0.25
                },

                {
                    "box_name": "9x12x6",
                    "length_inches": 9,
                    "width_inches": 12,
                    "height_inches": 6,
                    "box_weight_lbs": 0.5,
                    "box_cost_usd": 0.35
                },

                {
                    "box_name": "9x12x8",
                    "length_inches": 9,
                    "width_inches": 12,
                    "height_inches": 8,
                    "box_weight_lbs": 0.6,
                    "box_cost_usd": 0.45
                },
                {
                    "box_name": "9x12x10",
                    "length_inches": 9,
                    "width_inches": 12,
                    "height_inches": 10,
                    "box_weight_lbs": 0.7,
                    "box_cost_usd": 0.55
                }
            ]
        },

        "items": [
            {
                "item_id": "full_book",
                "quantity": 2,
                "width_inches": 8.5,
                "height_inches": 2,
                "length_inches": 11,
                "weight_oz_item": 16,
            },
            {
                "item_id": "half_book",
                "quantity": 4,
                "width_inches": 8.5,
                "height_inches": 2,
                "length_inches": 5.5,
                "weight_oz_item": 8,
            }
        ]

    }

{

  "response_status_code": 200, 

  "response_status_message": "HTTP 200 OK",


  "response_body": {
    "status": "SUCCESS",
    "description": "The optimization process was successful and found 1 valid solutions in 0.480000 seconds",


    "solutions": [
      {
        "status_code": 200,
        "status": "OPTIMIZATION_COMPLETE",
        "algorithm_name": "GREEDY(OBJECTIVE=CARTON_COST)",
        "request_id": "af94a026-fcc3-4f59",
        "solution_id": "805da13c-d237-44ab",
        "total_carton_cost_usd": 0.45,
        "total_item_quantity": 6,
        "total_item_lines": 2,
        "num_boxes": 1,
        "full_box_list": [
          "BOX_1"
        ],
        "full_item_list": [
          {
            "item_id": "full_book",
            "quantity": 2
          },
          {
            "item_id": "half_book",
            "quantity": 4
          }
        ],
        "solution_details": {
          "BOX_1": {
            "box_name": "9x12x8",
            "carton_cost_usd": 0.45,
            "box_fill_rate": 0.86,
            "visualization_link": "https://d3rzhiqfia1fmr.cloudfront.net/packing-visulization/7812e8e7-4399-4f04",
            "item_quantities": {
              "full_book": 2,
              "half_book": 4
            }
          }
        }
      }
    ]
  }
}

bottom of page