{"openapi":"3.0.0","info":{"version":"1.0.6","title":"3DC - Wickes Service Endpoints","description":"--- DRAFT API --- API documentation for Wickes service needs. These endpoints will be utilized by Wickes services to retrieve and construct data needed by the Design Tool (DT) and Wickes internal facade services. This is a draft document and request / response objects are subject to change"},"servers":[{"description":"Production environment","url":"https://wickes-services.3dcloud.io"},{"description":"Certification/Staging environment","url":"https://wickes-services-cert.3dcloud.io"},{"description":"Testing environment","url":"https://wickes-services-testing.3dcloud.io"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API_Key"}},"schemas":{"designRequest":{"type":"object","description":"Request object","required":["username","projectName"],"properties":{"username":{"type":"string","format":"email","description":"username to which the resulting project will be assigned ownership","example":"user@place.com"},"projectName":{"type":"string","description":"string name that will be used for the resulting project's name","example":"New Project Name"},"userGuid":{"type":"string","format":"uuid","description":"guid associated with the user that will be opening the project in design tool. Value will be passed into the correlation data"},"designCategory":{"type":"string","description":"Category of the design","enum":["kitchen","bathroom"]},"storeNumber":{"type":"string","description":"Wickes store number from which the design request is originating. Value will be passed into the correlation data"},"quoteNumber":{"type":"string","description":"Wickes customer quote number to which the design is assigned. Value will be passed into the correlation data"},"orderNumber":{"type":"string","description":"Wickes order number to which the design is assigned. Value will be passed into the correlation data"}}},"designResponse":{"type":"object","description":"Response object to design requests, register or duplicate","properties":{"projectName":{"type":"string","description":"The name of the project created."},"version":{"type":"number","description":"The latest version number for the project"},"uuid":{"type":"string","format":"uuid","description":"uuid for the new project"},"designUrl":{"type":"string","format":"url","description":"The designUrl that can be used with the correlation service to retrieve DT loading data"},"storeNumber":{"type":"string","description":"The Wickes store number from which the project creation request was made"},"quoteNumber":{"type":"string","description":"The Wickes customer quote number to which the project is assigned"},"orderNumber":{"type":"string","description":"Wickes order number to which the design is assigned"},"correlationId":{"type":"string","format":"uuid","description":"Correlation ID value taken from the designUrl"}},"example":{"projectName":"New Project Name","version":1,"uuid":"ee5b7dce-1008-47f8-875b-307bae129740","designUrl":"www.DTURL.com/?correlationId=1040ee59-6634-4292-84bc-fa3f1942f3e2","storeNumber":"0000","quoteNumber":"0000","correlationId":"d0265515-7d25-4e28-9e57-5eb3eb9bf613"}},"manifestObject":{"type":"object","description":"Design project manifest data","properties":{"projectName":{"type":"string"},"projectFilename":{"type":"string"},"thumbnailFilename":{"type":"string"},"bomFilename":{"type":"string"},"bomOutputFilename":{"type":"string","format":"nullable"},"panoramaStatus":{"type":"string"},"panoramaFilename":{"type":"string","format":"nullable"},"panoramaMobileFilename":{"type":"string","format":"nullable"},"panoramaFilenameSharable":{"type":"string","format":"nullable"},"panoramaMobileFilenameSharable":{"type":"string","format":"nullable"},"screenshotFilenames":{"type":"array","items":{"type":"string"}},"sharableScreenshotFilenames":{"type":"array","items":{"type":"string"}},"timestamp":{"type":"integer","format":"int64"},"uuid":{"type":"string"},"version":{"type":"integer","format":"int32"},"clientId":{"type":"string"},"clientAppId":{"type":"string"},"storeId":{"type":"string","format":"nullable"},"ownerUuid":{"type":"string"},"ownerEmail":{"type":"string"},"associateIds":{"type":"array","items":{"type":"string"}},"quoteId":{"type":"string","format":"nullable"},"isDeleted":{"type":"boolean"},"tags":{"type":"array","items":{"type":"object","description":"key value pairs"}}}},"bomObject":{"type":"object","properties":{"projectUuid":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"version":{"type":"string","example":"3.0"},"latestVersion":{"type":"string","example":"3.0"},"range":{"type":"string","example":"7359 Intelliga - MElrose Carbon"},"category":{"type":"string","example":"Madison"},"projectName":{"type":"string","example":"Example Project"},"userId":{"type":"string","example":"Example Project"},"dateTime":{"type":"string","format":"date-time"},"createdBy":{"type":"string","example":"TBD what identifier this is"},"storeNumber":{"type":"string"},"quoteNumber":{"type":"string"},"orderNumber":{"type":"string"},"correlationId":{"type":"string"},"designCategory":{"type":"string","description":"Category of the design","enum":["kitchen","bathroom"]},"designArtifacts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","pano","image"]},"link":{"type":"string","format":"url"},"name":{"type":"string","description":"file name, without extension of artifact"}}}},"products":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string","example":"1234650"},"name":{"type":"string","example":"Sensio Grantham 700 x 12000mm LED Triple Door Mirror Cabinet"},"description":{"type":"string"},"quantity":{"type":"integer"},"type":{"type":"string","enum":["SKU","Installation","Non-Selling"]},"dimensions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["height","width","volume","weight"]},"uom":{"type":"string","example":"m"},"value":{"type":"number","example":3.14159265359}}}},"hierarchy":{"type":"object","properties":{"type":{"type":"string","enum":["category","subcategory","group"]},"description":{"type":"string","description":"category, subcategory, or group description"},"code":{"type":"string","example":156}}}}}}}}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/api/designs/v1/register":{"post":{"summary":"Create Empty Design Project","description":"Creates a new empty DT project with the provided name and owned by the specified user. Returns the resulting project UUID and redirect designUrl with correlation Id","tags":["Design Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/designRequest"}}}},"responses":{"401":{"description":"Invalid or missing API Key or Invalid or missing username"},"500":{"description":"Error creating project or retrieving design URL"},"200":{"description":"Project and desginUrl created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/designResponse"}}}}}}},"/api/designs/v1/{projectUuid}/duplicate":{"post":{"summary":"Duplicate Design Project","description":"Creates a new copy of a specified project. New project is owned by the requesting user. Returns the new project's uuid as well as the designUrl that can be used to load the project in the DT","tags":["Design Management"],"parameters":[{"name":"projectUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/designRequest"}}}},"responses":{"401":{"description":"Invalid or missing API Key or Invalid or missing username"},"404":{"description":"Specified project not found"},"500":{"description":"Error duplicating project"},"200":{"description":"Project Duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/designResponse"}}}}}}},"/api/designs/v1/correlation/redirect":{"post":{"summary":"Post data and retrieve redirect with Correlation Id for DT","description":"Takes in a json body which is stored in a one time use cache. Returns back a redirect url with a correlationId query param. The correlationId is the cache key used for the one time retrieval of the uploaded data. The data body is intended to specify the design details for the Design Tool to load","tags":["Correlation Service"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uuid","userGuid","username"],"properties":{"uuid":{"type":"string","format":"uuid","description":"part of the data needed to be passed to the DT, specifies the project uuid associated with the design request","example":"20583edf-0ae0-4eef-9bcd-a6f836d4e2db"},"userGuid":{"type":"string","format":"uuid","description":"part of the data passed to the DT, guid associated with the user that will be opening the project in design tool. Value will be passed into the correlation data"},"storeNumber":{"type":"string","description":"part of the data passed to the DT, Wickes store number from which the design request is originating. Value will be passed into the correlation data"},"quoteNumber":{"type":"string","description":"part of the data passed to the DT, Wickes customer quote number to which the design is assigned. Value will be passed into the correlation data"},"orderNumber":{"type":"string","description":"Wickes order number to which the design is assigned. Value will be passed into the correlation data"},"username":{"type":"string","format":"email","description":"part of the data passed to the DT, specifies the user associated with the design request","example":"user@place.com"},"version":{"type":"number","example":1,"description":"part of the data passed to the DT, specifies the version of the project to load"},"isReadOnly":{"type":"boolean","description":"part of the data passed to the DT, specifies whether the design is to be opened in edit or readonly mode"},"isOrder":{"type":"boolean","description":"part of the data passed to the DT, specifies whether the design is editing an order or a quote"}}}}}},"responses":{"400":{"description":"Invalid request body"},"401":{"description":"Invalid or missing API Key or Invalid or missing username"},"500":{"description":"Error generating correlation id"},"302":{"description":"Correlation Id Created with Redirect URL","headers":{"Location":{"schema":{"type":"string","format":"url","description":"The url to redirect to, contains correlationId query param that will be used by the DT to retrieve the design information for loading"},"example":"https://redirecturl.com?correlationId=bc11a920-edb6-44a1-b952-dbdbaf77a00b"},"correlationId":{"schema":{"type":"string","format":"uuid","description":"The correlationId value present in the Location redirect url","example":"d0265515-7d25-4e28-9e57-5eb3eb9bf613"}}}}}}},"/api/designs/v1/{projectUuid}/update":{"post":{"summary":"Post property updates to design project tags","description":"Takes in projectUuid and specific property tag values to update on the project.","tags":["Design Management"],"parameters":[{"name":"projectUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username"],"properties":{"username":{"type":"string","format":"email","description":"username associated with the design project's owner","example":"user@place.com"},"quoteNumber":{"type":"string","description":"optional - part of the data passed to the DT, Wickes customer quote number to which the design is assigned"},"orderNumber":{"type":"string","description":"optional - part of the data passed to the DT, Wickes order number to which the design is assigned"},"storeNumber":{"type":"string","description":"optional - part of the data passed to the DT, Wickes store number to which the design is assigned"}}}}}},"responses":{"200":{"description":"Tags updated"},"400":{"description":"Invalid request body"},"401":{"description":"Invalid or missing API Key"},"500":{"description":"Error updating property"},"404":{"description":"Correlation Id Created with Redirect URL"}}}},"/api/designs/v1/{projectUuid}/bom":{"get":{"summary":"Retrieve BOM JSON for Design Project","description":"Takes in a design project UUID and returns back a json object containing BOM data. NOTE THAT ALL RESPONSE FIELDS ARE TENTATIVE AND SUBJECT TO CHANGE","tags":["BOM Service"],"parameters":[{"name":"projectUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"uuid of the project for which to retrieve the BOM data","example":"ee5b7dce-1008-47f8-875b-307bae129740"}},{"name":"version","in":"query","required":false,"schema":{"type":"number","description":"specify the version of the project for which to return the BOM data"}}],"responses":{"401":{"description":"Invalid or missing API Key"},"404":{"description":"Project or version not found"},"500":{"description":"Error retrieving BOM"},"200":{"description":"BOM data retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bomObject"}}}}}}},"/api/designs/v1/{projectUuid}/manifest":{"get":{"summary":"Retrieve Report PDFs and files","description":"Takes in a design project UUID and returns back a json object whose properties identify the report items availabe and the url from which those files may be retrieved","tags":["Design Management"],"parameters":[{"name":"projectUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"401":{"description":"Invalid or missing API key"},"404":{"description":"Project Not Found"},"500":{"description":"Error retrieving Manifest"},"200":{"description":"Manifest data for design project","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/manifestObject"}}}}}}}},"/api/designs/v1/{projectUuid}/artifacts":{"get":{"summary":"Retrieve list of artifacts associated with design project","description":"Takes in a design project UUID and returns back a list of design artifacts associated with the project. Mirrors the data included in the BOM response, returning type, url, and name. Uses query params to request for specific artifact","tags":["Artifact Service"],"parameters":[{"name":"projectUuid","in":"path","required":true,"description":"Project uuid","schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","required":false,"description":"when requesting specific artifact, this denotes the type of the artifact requested. Must be accompanied by name when used","schema":{"type":"string","enum":["pdf","pano","image"]}},{"name":"name","in":"query","required":false,"description":"when requesting specific artifact, this denotes the name of the artifact requested. must be accompanied by type when used","schema":{"type":"string"}}],"responses":{"200":{"description":"URLs for artifact files","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","pano","image"]},"link":{"type":"string","format":"url","description":"public  url from which artifact can be retrieved"},"name":{"type":"string","description":"file name, without extension of artifact"}},"example":{"type":"image","name":"kitchen window zoomed","link":"assets.3dcloud.io/path/to/image.jpg"}}}}}},"400":{"description":"Invalid params, type and name must be provided together if requesting a specific artifact url or left out to request all artifacts"},"401":{"description":"Invalid or missing API key"},"404":{"description":"Project or Artifact Not Found"},"500":{"description":"Error retrieving artifact data"}}}}}}