arrow_back Back to all endpoints
POST https://test-api.finerworks.com/v3/build_product_code

Build Product Code

Create a product code based on a list of material ids. This is used for the product builder to build a product code that can be added to the cart. Note this endpoint does not check if the materials are active or valid for use, it simply builds a code based on the ids provided.

Body

Name Description Type Additional information
build Build object containing all the details needed to build a product code. The more details included, the more accurate the product code and price will be. However, even if only a few details are included, a product code will still be generated based on the details provided. build_product_code_obj None.

Example JSON Body

application/json, text/json

{
  "build": {
    "CardStockID": 1,
    "CardStyleID": 2,
    "CardTypeID": 3,
    "FrameID": 4,
    "FrameW": 5.0,
    "FrameH": 6.0,
    "SheetW": 7.0,
    "SheetH": 8.0,
    "MatID": 9,
    "Mat1WindowW": 10.0,
    "Mat1WindowH": 11.0,
    "MatID2": 12,
    "Mat2WindowW": 13.0,
    "Mat2WindowH": 14.0,
    "GlassID": 15,
    "PrintProductTypeID": 16,
    "MediaID": 17,
    "MountingID": 18,
    "MountingSetID": 19,
    "MountingAddOns": [
      1,
      2
    ],
    "CanvasAddOns": [
      1,
      2
    ],
    "CardOptions": [
      1,
      2
    ],
    "Units": 20,
    "PrintW": 21.0,
    "PrintH": 22.0,
    "PhotoItemID": 23,
    "PhotoItemOptions": [
      1,
      2
    ],
    "ColorCorrect": true
  }
}

Sample Code Library

curl --location --request POST 'https://test-api.finerworks.com/v3/build_product_code' \
--header 'Content-Type: application/json' \
--header 'web_api_key: my-web-api-key-goes-here' \
--header 'app_key: my-app-key-goes-here' \
--data-raw '{
  "build": {
    "CardStockID": 1,
    "CardStyleID": 2,
    "CardTypeID": 3,
    "FrameID": 4,
    "FrameW": 5.0,
    "FrameH": 6.0,
    "SheetW": 7.0,
    "SheetH": 8.0,
    "MatID": 9,
    "Mat1WindowW": 10.0,
    "Mat1WindowH": 11.0,
    "MatID2": 12,
    "Mat2WindowW": 13.0,
    "Mat2WindowH": 14.0,
    "GlassID": 15,
    "PrintProductTypeID": 16,
    "MediaID": 17,
    "MountingID": 18,
    "MountingSetID": 19,
    "MountingAddOns": [
      1,
      2
    ],
    "CanvasAddOns": [
      1,
      2
    ],
    "CardOptions": [
      1,
      2
    ],
    "Units": 20,
    "PrintW": 21.0,
    "PrintH": 22.0,
    "PhotoItemID": 23,
    "PhotoItemOptions": [
      1,
      2
    ],
    "ColorCorrect": true
  }
}'