### Designs API Response Example Source: https://developer.whcc.com/pages/editor-api/designs Example JSON response from the Designs API. This response contains a list of design objects, each including details like product information, family, occasion, name, faces with layouts and previews, metadata, themes, selections, and publishing status. ```json [ { "_id": "zCmKRwkBxBqyd75tC", "product": { "_id": "benT9erT8BwHrn6Ws", "name": "5x7 Flat Card Horizontal" }, "family": { "_id": "F6k2L2g3ajq8Q8nZH", "name": "enchanted holiday", "priorityVal": 1 }, "occasion": { "_id": "2xSNk4YaKPtzPpCur", "name": "holiday" }, "name": "5x7 flat card horizontal", "faces": [ { "name": "Front", "nodeId": 10000, "layouts": [ { "name": "layout_1", "photoCount": 1, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_1_purple_CL675.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_1_blue_D7E9B.jpg" } }, { "name": "layout_2", "photoCount": 1, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_2_purple_ZJBCG.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_2_blue_CFY6I.jpg" } } ] }, { "name": "Back", "nodeId": 10001, "layouts": [ { "name": "layout_1", "photoCount": 1, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_1_purple_H8EKD.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_1_blue_V7GCE.jpg" } }, { "name": "layout_2", "photoCount": 3, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_2_purple_QJ9CD.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_2_blue_7C601.jpg" } } ] } ], "metadata": { "shapes": ["no", "a2", "a3", "a4", "a5", "b2", "c6", "c13", "d3", "e1"], "hasFoils": true }, "themes": { "purple": { "swatch": [102, 45, 127], "foil_pressed_foil_color": "rose_gold" }, "blue": { "swatch": [13, 155, 182], "foil_pressed_foil_color": "gold" } }, "selections": { "foil_pressed_designs": "making_spirits_bright", "foil_pressed_foil_color": "rose_gold", "shapes": "c6", "themes": "purple" }, "published": { "on": "2017-10-02T15:57:53.870Z" }, "publishState": "published" }, {"..."} ] ``` -------------------------------- ### Example Access Token Response Source: https://developer.whcc.com/pages/order-submit-api/request-access-token An example JSON response received after successfully requesting an access token. It includes client details, validity dates, and the obtained token. ```json { "ClientId": "10072", "ConsumerKey": "B431BE78D2E9FFFE3709", "EffectiveDate": "8/19/2018 3:10:26 PM CST", "ExpirationDate": "8/19/2018 4:10:26 PM CST", "Token": "835770680158" } ``` -------------------------------- ### GET /products Source: https://developer.whcc.com/pages/editor-api/products Retrieves the full catalog of products offered by WHCC. This data can be used to display product options to customers and to obtain product IDs for creating editors. ```APIDOC ## GET /products ### Description Retrieves the full catalog of products offered by WHCC. This data can be used to display product options to customers and to obtain product IDs for creating editors. ### Method GET ### Endpoint /api/v1/products ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```curl curl https://prospector.dragdrop.design/api/v1/products \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **_id** (string) - The ID of the product. Used to create an editor for this product. - **name** (string) - The name of the product, generally describing it more specifically. - **editorCompatibility** (string) - The type of editor supported for this product (e.g., `cardEditor`, `simpleEditor`, `albumEditor`). - **category** (object) - Information about the product's category. - **id** (string) - The ID of the category. - **name** (string) - The name of the category. - **metadata** (object) - Contains additional metadata about the product, such as sizing information and resolution. - **width** (float) - The width of the product in inches. - **height** (float) - The height of the product in inches. - **bleed** (float) - The bleed amount in inches. - **resolution** (float) - The print resolution in PPI. - **nodes** (object) - An array containing the nodes of the product, which can be filled with images or designs. - **name** (string) - The name for this node. - **nodeId** (int) - The ID for this node. - **height** (float) - The height of this node in inches. - **width** (float) - The width of this node in inches. - **x** (float) - The x position of this node in inches. - **y** (float) - The y position of this node in inches. - **dimensionKeys** (object) - Specifies which attribute determines the size if it's not a definitive attribute. #### Response Example ```json [ { "_id": "benT9erT8BwHrn6Ws", "name": "5x7 Flat Card Horizontal", "editorCompatibility": "cardEditor", "category": { "id": "7sXPek95CQ6f6N5Hu", "name": "Press Printed Cards" }, "metadata": { "width": 7, "height": 5, "bleed": 0.25, "resolution": 300 }, "nodes": [ { "name": "Front", "nodeId": 10000, "height": 5.25, "width": 7.25, "x": 0, "y": 0 }, { "name": "Back", "nodeId": 10001, "height": 5.25, "width": 7.25, "x": 0, "y": 0 } ] } ] ``` ``` -------------------------------- ### Get Available Products - cURL Source: https://context7.com/context7/developer_whcc_pages/llms.txt Retrieves the catalog of editable products including cards, prints, frames, and albums from Editor API. Requires an authorization token in the header. The response includes product metadata and node dimensions. ```bash curl https://prospector.dragdrop.design/api/v1/products \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` -------------------------------- ### Debossing Source: https://developer.whcc.com/pages/order-submit-api/albums How to specify debossing on album covers, including required attributes and examples for front and rear debossing. ```APIDOC ## Debossing ### Description Debossing is specified using item attributes with `AttributeValue` for the debossing text. Lines are separated by `\n`. Attributes for position, font, and color must also be defined for each cover. Debossing is only available on Material Covers. ### Front Debossing - Specify item attribute `2268` for front cover debossing. - Requires attributes for position (e.g., `2270`), font (e.g., `2273`), and color (e.g., `2277`). ### Request Body Example (Front Debossing) ```json { "AttributeUID": 2268, "AttributeValue": "FrontDBLine1 \n FrontDBLine2 \n FrontDBLine3" }, { "AttributeUID": 2270 // Center, Center position }, { "AttributeUID": 2273 // Quicksand font }, { "AttributeUID": 2277 // White color } ``` ### Rear Debossing - Specify item attribute `2269` for back cover debossing. - Requires attributes for position (e.g., `2281`), font (e.g., `2283`), and color (e.g., `2287`). ### Request Body Example (Rear Debossing) ```json { "AttributeUID": 2269, "AttributeValue": "BackDBLine1 \n BackDBLine2 \n BackDBLine3" }, { "AttributeUID": 2281 // Lower, Center position }, { "AttributeUID": 2283 // Oswald font }, { "AttributeUID": 2287 // Gold Foil color } ``` ``` -------------------------------- ### GET /api/catalog Source: https://developer.whcc.com/pages/order-submit-api/request-catalog Fetches the entire product catalog as JSON data. This data includes all available products and their attributes, which can be parsed and used within your application. ```APIDOC ## GET /api/catalog ### Description Retrieves a copy of the product catalog as JSON data. This is useful for parsing product and attribute information for order requests. ### Method GET ### Endpoint /api/catalog ### Parameters #### Query Parameters None #### Path Parameters None ### Request Example ```json curl https://apps.whcc.com/api/catalog/ \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -X GET ``` ### Response #### Success Response (200) - **catalog** (object) - Contains the entire product catalog data. #### Response Example ```json { "catalog": { "products": [ { "productUid": "example_product_uid", "name": "Example Product", "attributes": [ { "attributeUid": "example_attribute_uid", "name": "Example Attribute" } ] } ] } } ``` ``` -------------------------------- ### Query Products Catalog (curl) Source: https://developer.whcc.com/pages/editor-api/products Example request to the Products API endpoint using curl. This command fetches the complete product catalog based on provided authorization credentials. The response is in JSON format and includes detailed information about each product. ```curl curl https://prospector.dragdrop.design/api/v1/products \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` -------------------------------- ### Export Editors API Response Source: https://developer.whcc.com/pages/editor-api/ordering This is an example response from the Export Editors API. It provides a structured JSON object containing item details, order information, and pricing, which are essential for creating an order in the next step. ```json { "items": [ { "id": "sampleEditorId", "pricing": { ... }, "editor": { "id": "sampleEditorId", ... } }], "order": { "EntryId": "SampleEntryId", "Orders": [ { ... } ] }, "pricing": { ... } } ``` -------------------------------- ### GET /designs Source: https://developer.whcc.com/pages/editor-api/designs Retrieves the full catalog of designs offered based on your credentials. The response requires compression. ```APIDOC ## GET /designs ### Description Retrieves the full catalog of designs offered. This endpoint is designed to be queried on demand or periodically. The response is comprehensive and requires compression. ### Method GET ### Endpoint /api/v1/designs ### Parameters #### Query Parameters None #### Request Body None ### Request Example ``` curl --compressed https://prospector.dragdrop.design/api/v1/designs \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **_id** (string) - Unique identifier for the design. - **product** (object) - Information about the product the design belongs to. - **_id** (string) - Unique identifier for the product. - **name** (string) - Name of the product. - **family** (object) - Information about the design family. - **_id** (string) - Unique identifier for the design family. - **name** (string) - Name of the design family. - **priorityVal** (integer) - Priority value for the family. - **occasion** (object) - Information about the occasion the design is for. - **_id** (string) - Unique identifier for the occasion. - **name** (string) - Name of the occasion. - **name** (string) - Name of the design. - **faces** (array) - An array of design faces. - **name** (string) - Name of the face (e.g., "Front", "Back"). - **nodeId** (integer) - Node identifier for the face. - **layouts** (array) - An array of layouts for the face. - **name** (string) - Name of the layout. - **photoCount** (integer) - Number of photos supported by the layout. - **previews** (object) - URLs for different preview versions of the layout. - **purple** (string) - URL for the purple preview. - **blue** (string) - URL for the blue preview. - **metadata** (object) - Metadata associated with the design. - **shapes** (array) - Array of available shapes. - **hasFoils** (boolean) - Indicates if the design supports foils. - **themes** (object) - Theme information for the design. - **purple** (object) - Purple theme details. - **swatch** (array) - RGB color swatch. - **foil_pressed_foil_color** (string) - Foil pressed foil color. - **blue** (object) - Blue theme details. - **swatch** (array) - RGB color swatch. - **foil_pressed_foil_color** (string) - Foil pressed foil color. - **selections** (object) - Default selections for the design. - **foil_pressed_designs** (string) - Foil pressed design selection. - **foil_pressed_foil_color** (string) - Foil pressed foil color selection. - **shapes** (string) - Shape selection. - **themes** (string) - Theme selection. - **published** (object) - Publishing information. - **on** (string) - ISO 8601 timestamp of when the design was published. - **publishState** (string) - The publishing state of the design (e.g., "published"). #### Response Example ```json [ { "_id": "zCmKRwkBxBqyd75tC", "product": { "_id": "benT9erT8BwHrn6Ws", "name": "5x7 Flat Card Horizontal" }, "family": { "_id": "F6k2L2g3ajq8Q8nZH", "name": "enchanted holiday", "priorityVal": 1 }, "occasion": { "_id": "2xSNk4YaKPtzPpCur", "name": "holiday" }, "name": "5x7 flat card horizontal", "faces": [ { "name": "Front", "nodeId": 10000, "layouts": [ { "name": "layout_1", "photoCount": 1, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_1_purple_CL675.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_1_blue_D7E9B.jpg" } }, { "name": "layout_2", "photoCount": 1, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_2_purple_ZJBCG.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10000/layout_2_blue_CFY6I.jpg" } } ] }, { "name": "Back", "nodeId": 10001, "layouts": [ { "name": "layout_1", "photoCount": 1, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_1_purple_H8EKD.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_1_blue_V7GCE.jpg" } }, { "name": "layout_2", "photoCount": 3, "previews": { "purple": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_2_purple_QJ9CD.jpg", "blue": "https://s3.amazonaws.com/designs-stage.dragdrop.design/previews/zCmKRwkBxBqyd75tC/10001/layout_2_blue_7C601.jpg" } } ] } ], "metadata": { "shapes": ["no", "a2", "a3", "a4", "a5", "b2", "c6", "c13", "d3", "e1"], "hasFoils": true }, "themes": { "purple": { "swatch": [102, 45, 127], "foil_pressed_foil_color": "rose_gold" }, "blue": { "swatch": [13, 155, 182], "foil_pressed_foil_color": "gold" } }, "selections": { "foil_pressed_designs": "making_spirits_bright", "foil_pressed_foil_color": "rose_gold", "shapes": "c6", "themes": "purple" }, "published": { "on": "2017-10-02T15:57:53.870Z" }, "publishState": "published" }, { "_id": "...", "product": { "_id": "...", "name": "..." }, "family": { "_id": "...", "name": "...", "priorityVal": "..." }, "occasion": { "_id": "...", "name": "..." }, "name": "...", "faces": [ { "name": "...", "nodeId": "...", "layouts": [ { "name": "...", "photoCount": "...", "previews": { "purple": "...", "blue": "..." } } ] } ], "metadata": { "shapes": ["..."], "hasFoils": "..." }, "themes": { "purple": { "swatch": ["..."], "foil_pressed_foil_color": "..." }, "blue": { "swatch": ["..."], "foil_pressed_foil_color": "..." } }, "selections": { "foil_pressed_designs": "...", "foil_pressed_foil_color": "...", "shapes": "...", "themes": "..." }, "published": { "on": "..." }, "publishState": "..." } ] ``` ### Notes - The response payload is large and requires compression. Use the `Accept-Encoding: gzip, deflate, br` header or the `--compressed` flag with curl. ``` -------------------------------- ### Editor API - Get Available Products Source: https://context7.com/context7/developer_whcc_pages/llms.txt Retrieves the entire catalog of editable products available through the Editor API, including categories like cards, prints, frames, and albums. ```APIDOC ## GET /api/v1/products ### Description Fetches a comprehensive list of all editable products available in the catalog. This includes details about each product's type, category, dimensions, and editable nodes. ### Method GET ### Endpoint `/api/v1/products` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl https://prospector.dragdrop.design/api/v1/products \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - Returns an array of product objects. Each object contains: - **_id** (string) - Unique identifier for the product. - **name** (string) - Name of the product. - **editorCompatibility** (string) - Specifies the type of editor compatible with the product (e.g., "cardEditor"). - **category** (object) - Information about the product's category. - **id** (string) - Category ID. - **name** (string) - Category name. - **metadata** (object) - Product dimensions and resolution. - **width** (number) - Product width. - **height** (number) - Product height. - **bleed** (number) - Bleed area. - **resolution** (integer) - Resolution in DPI. - **nodes** (array) - Editable areas within the product. - **name** (string) - Name of the node (e.g., "Front", "Back"). - **nodeId** (integer) - Unique identifier for the node. - **height** (number) - Node height. - **width** (number) - Node width. - **x** (number) - X-coordinate of the node's origin. - **y** (number) - Y-coordinate of the node's origin. #### Response Example ```json [ { "_id": "benT9erT8BwHrn6Ws", "name": "5x7 Flat Card Horizontal", "editorCompatibility": "cardEditor", "category": { "id": "7sXPek95CQ6f6N5Hu", "name": "Press Printed Cards" }, "metadata": { "width": 7, "height": 5, "bleed": 0.25, "resolution": 300 }, "nodes": [ { "name": "Front", "nodeId": 10000, "height": 5.25, "width": 7.25, "x": 0, "y": 0 }, { "name": "Back", "nodeId": 10001, "height": 5.25, "width": 7.25, "x": 0, "y": 0 } ] } ] ``` ``` -------------------------------- ### POST /api/OrderImport Source: https://developer.whcc.com/pages/order-submit-api/order-import Create an order request JSON object and POST the request JSON to this endpoint to start a new order. Your order will not be processed until you submit the order after importing using `/api/OrderImport/Submit`. ```APIDOC ## POST /api/OrderImport ### Description This endpoint allows you to initiate a new order by sending a JSON request. The order is not processed until it is submitted via the `/api/OrderImport/Submit` endpoint. ### Method POST ### Endpoint /api/OrderImport ### Request Body - **EntryId** (string) - Required - An identifier for the import entry. - **Orders** (array) - Required - A list of orders to import. - **SequenceNumber** (integer) - Required - The sequence number of the order. - **Instructions** (string) - Optional - Special instructions for the order. - **Reference** (string) - Required - A reference identifier for the order. - **SendNotificationEmailAddress** (string) - Optional - Email address to send notifications to. - **SendNotificationEmailToAccount** (boolean) - Required - Whether to send notifications to the account email. - **ShipToAddress** (object) - Required - Shipping address details. - **Name** (string) - Required - Name for the recipient. - **Attn** (string) - Optional - Attention line for the address. - **Addr1** (string) - Required - First line of the street address. - **Addr2** (string) - Optional - Second line of the street address. - **City** (string) - Required - City name. - **State** (string) - Required - State or province abbreviation. - **Zip** (string) - Required - Postal code. - **Country** (string) - Required - Country name or code. - **Phone** (string) - Required - Phone number. - **ShipFromAddress** (object) - Required - Shipping from address details. - **Name** (string) - Required - Name for the sender. - **Addr1** (string) - Required - First line of the street address. - **Addr2** (string) - Optional - Second line of the street address. - **City** (string) - Required - City name. - **State** (string) - Required - State or province abbreviation. - **Zip** (string) - Required - Postal code. - **Country** (string) - Required - Country name or code. - **Phone** (string) - Required - Phone number. - **OrderAttributes** (array) - Optional - Attributes for the order. - **AttributeUID** (integer) - Required - Unique identifier for the attribute. - **OrderItems** (array) - Required - Items included in the order. - **ProductUID** (integer) - Required - Unique identifier for the product. - **Quantity** (integer) - Required - Number of units for the item. - **ItemAssets** (array) - Required - Assets associated with the item. - **ProductNodeID** (integer) - Required - Node ID for the product asset. - **AssetPath** (string) - Required - URL path to the asset. - **ImageHash** (string) - Required - Hash of the image asset. - **PrintedFileName** (string) - Required - Filename for printing. - **AutoRotate** (boolean) - Required - Whether to auto-rotate the image. - **AssetEnhancement** (object) - Optional - Enhancements for the asset. - **ItemAttributes** (array) - Optional - Attributes for the item. - **AttributeUID** (integer) - Required - Unique identifier for the attribute. ### Request Example ```json { "EntryId": "12345", "Orders": [ { "SequenceNumber": 1, "Instructions": null, "Reference": "OrderID 12345", "SendNotificationEmailAddress": null, "SendNotificationEmailToAccount": true, "ShipToAddress": { "Name": "Chris Hanline", "Attn": null, "Addr1": "2840 Lone Oak Parkway", "Addr2": null, "City": "Eagan", "State": "MN", "Zip": "55121", "Country": "US", "Phone": "6516468263" }, "ShipFromAddress": { "Name": "Returns Department", "Addr1": "3432 Denmark Ave", "Addr2": "Suite 390", "City": "Eagan", "State": "MN", "Zip": "55123", "Country": "US", "Phone": "8002525234" }, "OrderAttributes": [ { "AttributeUID": 96 }, { "AttributeUID": 545 } ], "OrderItems": [ { "ProductUID": 2, "Quantity": 1, "ItemAssets": [ { "ProductNodeID": 10000, "AssetPath": "https://whcc-api-testing.s3.amazonaws.com/sample-images/sample-image-1.jpg", "ImageHash": "a9825bb0836325e07ccfed16751b1d07", "PrintedFileName": "sample-image-1.jpg", "AutoRotate": true, "AssetEnhancement": null } ], "ItemAttributes": [ { "AttributeUID": 1 }, { "AttributeUID": 5 } ] } ] } ] } ``` ### Response #### Success Response (200) - **ConfirmationID** (string) - The ID for the order, needed for submitting the order. - **Account** (integer) - The WHCC account number. - **NumberOfOrders** (integer) - The number of orders included in this import. - **Received** (string) - The time the order was submitted. - **Orders** (array) - Additional data about the orders. - **SequenceNumber** (string) - The sequence number of the order. - **SubTotal** (string) - The cost of the order before tax. - **Tax** (string) - The sales tax amount for the order. - **Total** (string) - The total cost of the order, including tax. - **Products** (array) - An array of product billing items. - **ProductDescription** (string) - Description of the product billing item. - **Quantity** (integer) - The number of copies of this item. - **Price** (string) - The price per item for the product billing item. #### Response Example ```json { "Account": "10072", "ConfirmationID": "d4bcb9a7-caf0-4d2b-aa18-674a5d2c527e", "EntryID": "", "Key": "B431BE78D2E9FFFE3709", "NumberOfOrders": 1, "Orders": [{ "LineItems": [], "Note": "", "Products": [{ "Price": "0.65", "ProductDescription": "Print Fulfillment 5x7", "Quantity": 1 }, { "Price": "3.48", "ProductDescription": "Fulfillment Shipping - Economy", "Quantity": 1 }], "SequenceNumber": "1", "SubTotal": "4.13", "Tax": "0.29", "Total": "4.42" }], "Received": "8/19/2018 4:34:01 PM Central Time" } ``` ``` -------------------------------- ### Create Editor API Request (cURL) Source: https://developer.whcc.com/pages/editor-api/create-editor Example of creating an editor using a cURL request. This demonstrates how to send the required JSON payload, including user ID, product/design IDs, and redirect URLs, to the Editor API endpoint. Ensure your Authorization header contains a valid bearer token. ```curl curl https://prospector.dragdrop.design/api/v1/editors \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"userId":"{{accountId}}","productId":"b7jW7PmsfByoSxQ5m","designId":"ztRMDiHup8ooFhxLr","redirects":{"complete":{"text":"Checkout","url":"https://yourdomain.com/return"},"cancel":{"text":"Change Design","url":"https://yourdomain.com/cancel"}}}' ``` -------------------------------- ### Fetch Designs Catalog (curl) Source: https://developer.whcc.com/pages/editor-api/designs Example request to fetch the full catalog of designs using curl. This request includes the --compressed flag, which is essential for handling the large response payload. It also demonstrates setting authorization and content type headers. ```curl curl --compressed https://prospector.dragdrop.design/api/v1/designs \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` -------------------------------- ### Export Editor Configuration Payload Example Source: https://developer.whcc.com/pages/editor-api/order-export This JSON object represents the structure of a payload used to export editor configurations. It includes details about items, their attributes, product information, quantity, and editor ID. It also contains pricing information such as currency, marked-up price, and base price. ```json { "editors": [ { "items": [ { "ItemAttributes": [ { "AttributeUID": 1011 }, { "AttributeUID": 2118 }, { "AttributeUID": 1035 }, { "AttributeUID": 1029 }, { "AttributeUID": 2119 }, { "AttributeUID": 539 }, { "AttributeUID": 2126 }, { "AttributeUID": 2719 } ], "ProductUID": 426, "Quantity": 1, "EditorId": "sampleEditorId1" } ], "pricing": { "code": "USD", "totalOrderMarkedUpPrice": 627.5, "totalOrderBasePrice": 456.25 } } ] } ``` -------------------------------- ### Callback URL on User Denial (URL) Source: https://developer.whcc.com/pages/order-submit-api/oauth-login-flow This example demonstrates the callback URL structure when a user denies the OAuth request on the login page. It includes error parameters indicating the denial, such as 'error', 'error_reason', and 'error_description'. ```url https://webhook.site/e0cbfb89-d66b-4fc1-b25f-d42aa8908101?sessionID=1234567890&error=access_denied&error_reason=user_denied&error_description=The+user+denied+your+request ``` -------------------------------- ### Curl Request to Export Editor Configurations Source: https://developer.whcc.com/pages/editor-api/order-export This example demonstrates how to make a `curl` request to the WHCC API's export endpoint. It includes necessary headers such as Authorization, Accept, and Content-Type, along with a JSON payload specifying the editor IDs to export. ```bash curl https://prospector.dragdrop.design/api/v1/oas/editors/export \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"editorIds": ["vstpieXAAr66mFkrR"]}' ``` -------------------------------- ### Order Submit API - Retrieve Product Catalog Source: https://context7.com/context7/developer_whcc_pages/llms.txt Download the complete JSON product catalog containing all available products, attributes, and configurations. ```APIDOC ## GET /api/catalog ### Description Download the complete JSON product catalog containing all available products, attributes, and configurations. ### Method GET ### Endpoint https://apps.whcc.com/api/catalog/ ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer token obtained from the Access Token endpoint. ### Request Example ```bash curl https://apps.whcc.com/api/catalog/ \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -X GET ``` ### Response #### Success Response (200) - **Categories** (array) - A list of product categories. - **Id** (integer) - The category ID. - **Name** (string) - The category name. - **ProductList** (array) - A list of products within the category. - **Id** (integer) - The product ID. - **Name** (string) - The product name. - **ProductUID** (integer) - The product unique identifier. - **AttributeCategories** (array) - A list of attribute categories for the product. - **Id** (integer) - The attribute category ID. - **CategoryName** (string) - The attribute category name. - **RequiredLevel** (integer) - The required level for this attribute category. - **Attributes** (array) - A list of attributes within the category. - **Id** (integer) - The attribute ID. - **AttributeName** (string) - The attribute name. - **AttributeCategoryUID** (integer) - The unique identifier of the attribute category. - **ProductNodes** (array) - A list of product nodes with dimensions. - **DP2NodeID** (integer) - The DP2 Node ID. - **W** (integer) - The width of the product. - **H** (integer) - The height of the product. - **Key** (string) - A key associated with the catalog (likely related to the consumer key). #### Response Example ```json { "Categories": [{ "Id": 215, "Name": "Partner Photo Fulfillment", "ProductList": [{ "Id": 3, "Name": "8x10", "ProductUID": 3, "AttributeCategories": [{ "Id": 2, "CategoryName": "Paper Types", "RequiredLevel": 1, "Attributes": [{ "Id": 4, "AttributeName": "Glossy Paper", "AttributeCategoryUID": 2 }, { "Id": 5, "AttributeName": "Lustre Paper", "AttributeCategoryUID": 2 }] }], "ProductNodes": [{ "DP2NodeID": 10000, "W": 8, "H": 10 }] }] }], "Key": "B431BE78D2E9FFFE3709" } ``` ```