Create Requirements

Requirements route provides details of file types necessary for any product combination combination
This will help API users to implement file upload rules to the end users to when artwork is being added for each job. The response will specify file types needed for supplied product/option combination with file reason codes.

Resource URI

POST /requirements/products                                    

Input Parameters

@param product_uuid {uuid} UUID of a Product.
@param option_uuids {uuid} Array of Option UUIDs for all options.

Sample Request URI

html

https://api.4over.com/requirements/products

Sample Request Body

JSON

{
    "products": [
        {
            "product_uuid": "61007e78-b7a7-41d3-8e97-10b046cc4629",
            "option_uuids": [
                "32d3c223-f82c-492b-b915-ba065a00862f",
                "6f4fd47a-f70f-4f3d-84f8-a78ef9a62a5a"
            ]
        },
        {
            "product_uuid": "a035d8fd-b99e-4eb6-95ad-6fc3ac0c1746",
            "option_uuids": [
                "13abbda7-1d64-4f25-8bb2-c179b224825d",
                "cb84e4f5-cf63-4c25-b3c3-d22fc7dcf09d"
            ]
        }
    ]
}

Sample Response

JSON

{
    "entities": [
        {
            "product": {
                "product_uuid": "61007e78-b7a7-41d3-8e97-10b046cc4629",
                "name": "CNP-STUV-4X4",
                "description": "4\" X 4\" Stickers with UV"
            },
            "option_uuids": [
                "32d3c223-f82c-492b-b915-ba065a00862f",
                "6f4fd47a-f70f-4f3d-84f8-a78ef9a62a5a"
            ],
            "file_requirements": [
                {
                    "file_reason_code_uuid": "7b3007a1-c296-447b-96cf-ca9d0fb6621a",
                    "fr": "Front"
                }
            ]
        },
        {
            "product": {
                "product_uuid": "a035d8fd-b99e-4eb6-95ad-6fc3ac0c1746",
                "name": "16PT-PCSPUVFR-5.5X2.125",
                "description": "5.5\" X 2.125\" 16PT Postcards with Spot UV on front only, No UV Coating on the back"
            },
            "option_uuids": [
                "13abbda7-1d64-4f25-8bb2-c179b224825d",
                "cb84e4f5-cf63-4c25-b3c3-d22fc7dcf09d"
            ],
            "file_requirements": [
                {
                    "file_reason_code_uuid": "00ff44a1-5558-4d3c-9bfa-b2443efce9de",
                    "bk": "Back"
                },
                {
                    "file_reason_code_uuid": "7b3007a1-c296-447b-96cf-ca9d0fb6621a",
                    "fr": "Front"
                }
            ]
        }
    ]
}