{"openapi":"3.1.0","info":{"title":"Remi Public API","version":"0","description":"API designed to be used by external partners to integrate with the Remi platform","contact":{"name":"Remi","url":"https://remihq.com","email":"support@remihq.com"}},"servers":[{"url":"https://api.remihq.com","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-remi-key","description":"Include this header in all authenticated requests."}},"schemas":{"Phase":{"type":"object","properties":{"phaseType":{"type":"string","enum":["pending_quote","pending_ntp","pending_permit_submission","pending_permit_approval","pending_install_scheduling","pending_install_complete","pending_backfill","pending_final_inspection_scheduling","pending_final_inspection_complete","pending_invoicing","pending_payment_received","completed","pending_intro_call","pending_sow_confirmation","pending_sub_project_completion"],"example":"pending_ntp","description":"Current phase of the bid"},"phaseStartDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the project entered the current phase"}},"required":["phaseType","phaseStartDate"],"example":{"phaseType":"pending_ntp","phaseStartDate":"2024-01-01T00:00:00.000Z"},"description":"Phase information with type and start date"},"Homeowner":{"type":"object","properties":{"firstName":{"type":"string","example":"John","description":"First name of the person"},"lastName":{"type":"string","example":"Doe","description":"Last name of the person"},"email":{"type":"string","format":"email","example":"john.doe@example.com","description":"Email address"},"phone":{"type":"string","example":"555-123-4567","description":"Phone number"},"phoneExtension":{"type":"string","example":"123","description":"Phone extension"},"preferredLanguage":{"type":"string","enum":["ENGLISH","SPANISH"],"example":"ENGLISH","description":"Preferred language for communication"},"preferredContactMethod":{"type":"string","enum":["CALL","EMAIL","TEXT"],"example":"EMAIL","description":"Preferred method of contact"}},"required":["firstName","lastName","email"],"example":{"firstName":"John","lastName":"Doe","email":"john.doe@example.com","phone":"555-123-4567","phoneExtension":"123","preferredLanguage":"ENGLISH","preferredContactMethod":"EMAIL"},"description":"Homeowner contact information"},"PropertyAddress":{"type":"object","properties":{"addressStreet":{"type":"string","example":"123 Main St","description":"Street address"},"city":{"type":"string","example":"Anytown","description":"City name"},"stateCode":{"type":"string","enum":["AS","AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","MP","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VT","VA","VI","WA","WV","WI","WY","UNKNOWN"],"example":"CA","description":"State code"},"zip":{"type":"string","example":"12345","description":"ZIP code"},"additionalInformation":{"type":"string","example":"Unit 2B","description":"Additional address information"},"gateCode":{"type":"string","example":"1234","description":"Gate access code"},"isHoaApprovalRequired":{"type":"boolean","example":true,"description":"Indicates if HOA approval is required for the job"}},"required":["addressStreet","city","stateCode","zip","isHoaApprovalRequired"],"example":{"addressStreet":"123 Main St","city":"Anytown","stateCode":"CA","zip":"12345","additionalInformation":"Unit 2B","gateCode":"1234","isHoaApprovalRequired":true},"description":"Property address information"},"BillingAddress":{"type":"object","properties":{"addressStreet":{"type":"string","example":"123 Main St","description":"Street address"},"city":{"type":"string","example":"Anytown","description":"City name"},"stateCode":{"type":"string","enum":["AS","AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","MP","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VT","VA","VI","WA","WV","WI","WY","UNKNOWN"],"example":"CA","description":"State code"},"zip":{"type":"string","example":"12345","description":"ZIP code"},"additionalInformation":{"type":"string","example":"Unit 2B","description":"Additional address information"}},"required":["addressStreet","city","stateCode","zip"],"example":{"addressStreet":"123 Main St","city":"Anytown","stateCode":"CA","zip":"12345","additionalInformation":"Unit 2B"},"description":"Billing address information"},"File":{"type":"object","properties":{"name":{"type":"string","example":"completed-work-photo.jpg","description":"Name of the file"},"type":{"type":"string","enum":["photo","document"],"example":"photo","description":"Type of file, either document or photo"},"url":{"type":"string","format":"uri","example":"https://www.example.com/job/123","description":"URL to access the resource"}},"required":["name","type","url"],"example":{"id":"file_abc123xyz789","name":"completed-work-photo.jpg","type":"photo","url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","createdAt":"2024-01-01T00:00:00.000Z"},"description":"File information"},"Quote":{"type":"object","properties":{"id":{"type":"string","example":"q-123-XXXXXXXXX","description":"Quote identifier"},"createdDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the resource was created"},"updatedDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the resource was last updated"},"archivedDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the quote was archived"},"expireDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the quote will expire"},"homeownerTotal":{"type":"number","example":1000,"description":"The total cost of the quote for the homeowner, including discounts and financing costs"},"quoteTotal":{"type":"number","example":1000,"description":"The total cost of the quote"},"isPriceGuaranteed":{"type":"boolean","example":true,"description":"Indicates if the price is guaranteed for the quote"},"isActiveQuote":{"type":"boolean","example":true,"description":"Indicates if the quote is active. This is the quote that will be used for the job, once approved. Only 1 quote per bid request can be active."},"isApproved":{"type":"boolean","example":true,"description":"Indicates if the quote has been approved. Only 1 quote per bid request can be approved."}},"required":["id","createdDate","updatedDate","homeownerTotal","quoteTotal","isPriceGuaranteed","isActiveQuote","isApproved"],"example":{"id":"q-123-XXXXXXXXX","createdDate":"2024-01-01T00:00:00.000Z","updatedDate":"2024-01-01T00:00:00.000Z","archivedDate":"2024-01-01T00:00:00.000Z","expireDate":"2024-01-01T00:00:00.000Z","homeownerTotal":1000,"quoteTotal":1000,"isPriceGuaranteed":true,"isActiveQuote":true,"isApproved":true},"description":"Quote information and pricing details"},"CompletionOfWorkFile":{"type":"object","properties":{"id":{"type":"string","example":"file_abc123xyz789","description":"Unique identifier for a file"},"name":{"type":"string","example":"completed-work-photo.jpg","description":"Name of the file"},"type":{"type":"string","enum":["photo","document","other"],"example":"photo","description":"Type of file returned from the API"},"url":{"type":"string","format":"uri","example":"https://www.example.com/job/123","description":"URL to access the resource"}},"required":["id","name","type","url"],"example":{"id":"file_abc123xyz789","name":"completed-work-photo.jpg","type":"photo","url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","createdAt":"2024-01-01T00:00:00.000Z"},"description":"File information for completion of work"},"Project":{"type":"object","properties":{"id":{"type":"number","nullable":true,"example":12345,"description":"Unique identifier of the project"},"phase":{"$ref":"#/components/schemas/Phase"},"deadline":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the project is due"},"completedDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the project was completed"},"createdDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the resource was created"},"updatedDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the resource was last updated"},"category":{"type":"string","enum":["assessment","full_roof","partial_roof","structural","vent_work","misc","rfr","reinstall","removal","bid","backfill","corrections","gutters","siding","site_visit","solar_redesign","estimate_only"],"example":"full_roof","description":"Category of the project"},"installScheduledAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the project is scheduled to be installed"},"installStartedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the project installation started"},"installCompletedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the project installation was completed"},"estimatedProductionDays":{"type":"number","nullable":true,"example":10,"description":"The estimated number of days to complete the project"},"projectStatus":{"type":"string","enum":["in_progress","done","canceled","on_hold","urgent","reopened","closed_lost","merged"],"example":"done","description":"The status of the project"},"cancellationReason":{"type":"string","nullable":true,"enum":["cancelled_by_corporate_partner","correcting_internal_error","competitor_pricing","waiting_to_do_project","bad_homeowner_experience","no_roof_work_needed","sow_not_supported","patch_work","ground_equipment_only","homeowner_unresponsive","homeowner_committed_to_another_contractor","on_hold_for_60_days","unknown_cancellation_reason",null],"example":"on_hold_for_60_days","description":"The reason for the status of the project"}},"required":["id","phase","createdDate","updatedDate","category","estimatedProductionDays","projectStatus","cancellationReason"],"example":{"id":12345,"phase":{"phaseType":"pending_ntp","phaseStartDate":"2024-01-01T00:00:00.000Z"},"deadline":"2024-01-01T00:00:00.000Z","completedDate":"2024-01-01T00:00:00.000Z","createdDate":"2024-01-01T00:00:00.000Z","updatedDate":"2024-01-01T00:00:00.000Z","category":"full_roof","installScheduledAt":"2024-01-01T00:00:00.000Z","installStartedAt":"2024-01-01T00:00:00.000Z","installCompletedAt":"2024-01-01T00:00:00.000Z","estimatedProductionDays":10,"projectStatus":"done","cancellationReason":"on_hold_for_60_days"},"description":"Project information"}},"parameters":{}},"tags":[{"name":"Bid Request","x-displayName":"Bid Requests","description":"A bid request is a Remi job. It is composed of a homeowner and an address. It is the starting point for a job."},{"name":"Quote","x-displayName":"Quotes","description":"Quotes are estimates for the cost of a roof. Each bid request can have multiple quotes. However, only 1 will be active. The active quote will be used to send documents, and will become the scope of a project once ntp is received"},{"name":"NTP","x-displayName":"Notice to Proceed","description":"Notice to proceed is construction jargon for \"permission\". Once NTP is submitted to Remi, the job will be scheduled and work will begin"},{"name":"HIC","x-displayName":"Homeowner Contracts","description":"The homeowner contract, also referred to as an HIC (Home Improvement Contract). This is the document that the homeowner signs to authorize the work."},{"name":"NTP","x-displayName":"Notice to Proceed","description":"Notice to proceed is construction jargon for \"permission\". Once NTP is submitted to Remi, the job will be scheduled and work will begin"},{"name":"Project","x-displayName":"Projects","description":"Projects are children of bid requests. They are generated based on the scope of work contained in the approved quote."},{"name":"Health","x-displayName":"System","description":"System endpoints"}],"paths":{"/v0/health":{"get":{"summary":"Health check for Remi API","operationId":"health","description":"Returns the current health status of the API","tags":["Health"],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok","description":"The status of the health check"},"timestamp":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The timestamp of the health check"},"version":{"type":"string","example":"1.0.0","description":"The version of the API"}},"required":["status","timestamp","version"],"example":{"status":"ok","timestamp":"2024-01-01T00:00:00.000Z","version":"1.0.0"},"description":"Health check response information"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/bid-request":{"get":{"summary":"Get Bid Request","description":"This route retrieves a bid request based on the id provided","operationId":"getBidRequest","tags":["Bid Request"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"required":true,"description":"Unique identifier of the bid request","name":"id","in":"query"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"query"}],"responses":{"200":{"description":"Bid retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"phase":{"$ref":"#/components/schemas/Phase"},"homeowner":{"$ref":"#/components/schemas/Homeowner"},"propertyAddress":{"$ref":"#/components/schemas/PropertyAddress"},"url":{"type":"string","format":"uri","example":"https://www.example.com/job/123","description":"URL to access the resource"}},"required":["id","phase","homeowner","propertyAddress","url"],"example":{"id":"XXXX1234","organizationId":"remi","instructions":"These instructions will be sent to the quoting team. Please include any additional details that may be helpful for the quoting team to understand the request.","url":"https://www.example.com/job/123","files":[{"name":"completed-work-photo.jpg","type":"photo","url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX"}],"phase":{"phaseType":"pending_ntp","phaseStartDate":"2024-01-01T00:00:00.000Z"},"propertyAddress":{"addressStreet":"123 Main St","city":"Anytown","stateCode":"CA","zip":"12345","additionalInformation":"Unit 2B","gateCode":"1234","isHoaApprovalRequired":true},"homeowner":{"firstName":"John","lastName":"Doe","email":"john.doe@example.com","phone":"555-123-4567","phoneExtension":"123","preferredLanguage":"ENGLISH","preferredContactMethod":"EMAIL"}},"description":"Response containing bid details"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}},"post":{"summary":"Create Bid Request","description":"This route creates a bid request based on a person and their property.","operationId":"createBidRequest","tags":["Bid Request"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"description":"This request body contains the necessary data to create a bid request.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"propertyAddress":{"$ref":"#/components/schemas/PropertyAddress"},"billingAddress":{"$ref":"#/components/schemas/BillingAddress"},"homeowner":{"$ref":"#/components/schemas/Homeowner"},"instructions":{"type":"string","example":"These instructions will be sent to the quoting team. Please include any additional details that may be helpful for the quoting team to understand the request.","description":"Instructions for the quoting team"},"url":{"type":"string","format":"uri","example":"https://www.example.com/job/123","description":"URL to access the resource"},"organizationId":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}}},"required":["id","propertyAddress","billingAddress","homeowner","instructions","url","files"],"example":{"id":"XXXX1234","organizationId":"remi","instructions":"These instructions will be sent to the quoting team. Please include any additional details that may be helpful for the quoting team to understand the request.","url":"https://www.example.com/job/123","files":[{"name":"completed-work-photo.jpg","type":"photo","url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX"}],"propertyAddress":{"addressStreet":"123 Main St","city":"Anytown","stateCode":"CA","zip":"12345","additionalInformation":"Unit 2B","gateCode":"1234","isHoaApprovalRequired":true},"billingAddress":{"addressStreet":"123 Main St","city":"Anytown","stateCode":"CA","zip":"12345","additionalInformation":"Unit 2B","gateCode":"1234","isHoaApprovalRequired":true},"homeowner":{"firstName":"John","lastName":"Doe","email":"john.doe@example.com","phone":"555-123-4567","phoneExtension":"123","preferredLanguage":"ENGLISH","preferredContactMethod":"EMAIL"}},"description":"Request to create a new bid"}}}},"responses":{"201":{"description":"Bid created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bid created successfully","description":"Message indicating the bid was created successfully"}},"required":["message"],"example":{"message":"Bid created successfully"},"description":"Response for successful bid creation"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Conflict"],"example":"Conflict","description":"Error message indicating a conflict occurred"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/quotes/{quoteId}":{"get":{"summary":"Get Quote","operationId":"getQuote","description":"Get quote for a given quote id","tags":["Quote"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"q-123-XXXXXXXXX","description":"Quote identifier"},"required":true,"description":"Quote identifier","name":"quoteId","in":"path"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"path"}],"responses":{"200":{"description":"Quote retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"quote":{"$ref":"#/components/schemas/Quote"}},"required":["quote"],"example":{"quote":{"id":"q-123-XXXXXXXXX","createdDate":"2024-01-01T00:00:00.000Z","updatedDate":"2024-01-01T00:00:00.000Z","archivedDate":"2024-01-01T00:00:00.000Z","expireDate":"2024-01-01T00:00:00.000Z","homeownerTotal":1000,"quoteTotal":1000,"isPriceGuaranteed":true,"isActiveQuote":true,"isApproved":true}},"description":"Response containing quote details"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/quotes":{"get":{"summary":"Get Quotes","operationId":"getQuotes","description":"Get quotes for a given bid request id","tags":["Quote"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"required":true,"description":"Unique identifier of the bid request","name":"id","in":"query"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"query"}],"responses":{"200":{"description":"Quotes retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"quotes":{"type":"array","items":{"$ref":"#/components/schemas/Quote"},"example":[{"id":"q-123-XXXXXXXXX","createdDate":"2024-01-01T00:00:00.000Z","updatedDate":"2024-01-01T00:00:00.000Z","archivedDate":"2024-01-01T00:00:00.000Z","expireDate":"2024-01-01T00:00:00.000Z","homeownerTotal":1000,"quoteTotal":1000,"isPriceGuaranteed":true,"isActiveQuote":true,"isApproved":true}],"description":"Array of quotes for the bid request"}},"required":["quotes"],"example":{"quotes":[{"id":"q-123-XXXXXXXXX","createdDate":"2024-01-01T00:00:00.000Z","updatedDate":"2024-01-01T00:00:00.000Z","archivedDate":"2024-01-01T00:00:00.000Z","expireDate":"2024-01-01T00:00:00.000Z","homeownerTotal":1000,"quoteTotal":1000,"isPriceGuaranteed":true,"isActiveQuote":true,"isApproved":true}]},"description":"Response containing quotes for a bid request"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/quotes/{quoteId}/pdf":{"get":{"summary":"Quote PDF","operationId":"getQuotePdf","description":"Get quote PDF for a given quote id","tags":["Quote"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"q-123-XXXXXXXXX","description":"Quote identifier"},"required":true,"description":"Quote identifier","name":"quoteId","in":"path"}],"responses":{"200":{"description":"Quote PDF retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","description":"URL to access the quote PDF"}},"required":["url"],"example":{"url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX"},"description":"Quote response with PDF URL"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/quotes/{quoteId}/image":{"get":{"summary":"Quote Image","operationId":"getQuoteImage","description":"Get quote image for a given quote id","tags":["Quote"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"q-123-XXXXXXXXX","description":"Quote identifier"},"required":true,"description":"Quote identifier","name":"quoteId","in":"path"}],"responses":{"200":{"description":"Quote image retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","description":"URL to access the quote image"}},"required":["url"],"example":{"url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX"},"description":"Quote response with image URL"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/homeowner-contract/pdf":{"get":{"summary":"Homeowner Contract PDF","operationId":"getHomeownerContractPdf","description":"Get pdf of homeowner contract for a given bid request id","tags":["HIC"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"required":true,"description":"Unique identifier of the bid request","name":"id","in":"query"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"query"}],"responses":{"200":{"description":"HIC PDF retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","description":"URL to access the quote PDF"}},"required":["url"],"example":{"url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX"},"description":"HIC PDF response with download URL"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/homeowner-contract":{"get":{"summary":"Homeowner Contract Details","operationId":"getHicDetails","description":"Get homeowner contract status and related dates for a bid request. Returns signature status, sent date, signed date, and other contract-related information.","tags":["HIC"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"required":true,"description":"Unique identifier of the bid request","name":"id","in":"query"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"query"}],"responses":{"200":{"description":"Contract status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["completed","voided","draft","sent","viewed","uploaded","declined"],"example":"completed","description":"Status of the Home Improvement Contract (HIC) - whether it has been signed or not"},"sentDate":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z","description":"The date and time the HIC was sent to the homeowner"},"signedDate":{"type":"string","nullable":true,"example":"2024-01-01T12:30:00.000Z","description":"The date and time the HIC was signed by the homeowner"},"lastViewedDate":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z","description":"The date and time the HIC was last viewed by the homeowner"},"createdDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"The date and time the resource was created"},"expiresDate":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z","description":"The date and time the HIC will expire"}},"required":["status","sentDate","signedDate","lastViewedDate","createdDate","expiresDate"],"example":{"status":"completed","sentDate":"2024-01-01T00:00:00.000Z","signedDate":"2024-01-01T12:30:00.000Z","lastViewedDate":"2024-01-01T00:00:00.000Z","createdDate":"2024-01-01T00:00:00.000Z","expiresDate":"2024-01-01T00:00:00.000Z"},"description":"Response containing contract status and date information"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/send-homeowner-contract":{"post":{"summary":"Send Homeowner Contract","operationId":"sendHomeownerContract","description":"Send the homeowner contract to the homeowner for a given bid request id","tags":["HIC"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"required":true,"description":"Unique identifier of the bid request","name":"id","in":"query"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"query"}],"responses":{"200":{"description":"HIC sent successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Homeowner contract sent successfully","description":"Message indicating the homeowner contract was sent successfully"}},"required":["message"],"example":{"message":"Homeowner contract sent successfully"},"description":"Response indicating the homeowner contract has been sent"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/quotes/{quoteId}/approve":{"post":{"summary":"Approve Quote","operationId":"approveQuote","description":"Use this endpoint to approve a quote. Once approved, Remi will immediately send an HIC to the homeowner. Please advise the homeowner that they will be receiving an email from Pandadoc before approving a quote.","tags":["Quote"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"q-123-XXXXXXXXX","description":"Quote identifier"},"required":true,"description":"Quote identifier","name":"quoteId","in":"path"}],"responses":{"200":{"description":"Quote approved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Quote approved successfully","description":"Message indicating the quote was approved successfully"}},"required":["message"],"example":{"message":"Quote approved successfully"},"description":"Response to approve a quote"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/projects/{projectId}/completion-of-work":{"get":{"summary":"Get Completion of Work Files","operationId":"getCompletionOfWorkFiles","description":"Retrieve completion of work files including completed work photos and final inspection files. Supports opt-in file type selection.","tags":["Project"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"number","nullable":true,"example":12345,"description":"Unique identifier of the project"},"required":false,"description":"Unique identifier of the project","name":"projectId","in":"path"}],"responses":{"200":{"description":"Completion of work files retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"completedWorkPhotos":{"type":"array","items":{"$ref":"#/components/schemas/CompletionOfWorkFile"}},"finalInspectionFiles":{"type":"array","items":{"$ref":"#/components/schemas/CompletionOfWorkFile"}}},"required":["completedWorkPhotos","finalInspectionFiles"],"example":{"completedWorkPhotos":[{"id":"file_abc123xyz789","name":"completed-work-photo.jpg","type":"photo","url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","createdAt":"2024-01-01T00:00:00.000Z"}],"finalInspectionFiles":[{"id":"file_abc123xyz789","name":"completed-work-photo.jpg","type":"photo","url":"https://XXXXXXX.cloudfront.net/XXXXXX?Expires=1720732800&Signature=XXXXXX&Key-Pair-Id=XXXXXX","createdAt":"2024-01-01T00:00:00.000Z"}]},"description":"Completion of work files grouped by upload category"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/ntp":{"post":{"summary":"Submit NTP","operationId":"submitNtp","description":"Submit a notice to proceed for a job. Once submitted, Remi will immediately begin scheduling work with the homeowner. Please advise the homeowner that they will be receiving a phone call from Remi before submitting NTP.","tags":["NTP"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"description":"The request body for submitting NTP","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"organizationId":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"}},"required":["id"],"example":{"id":"XXXX1234","organizationId":"remi"},"description":"Request to submit a notice to proceed"}}}},"responses":{"200":{"description":"Successfully submitted notice to proceed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Notice to proceed submitted successfully","description":"Message indicating the notice to proceed was submitted successfully"}},"required":["message"],"example":{"message":"Notice to proceed submitted successfully"},"description":"Response to submit a notice to proceed"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/projects":{"get":{"summary":"Get projects","description":"Get all projects for a given bid request","operationId":"getProjects","tags":["Project"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"XXXX1234","description":"Unique identifier of the bid request"},"required":true,"description":"Unique identifier of the bid request","name":"id","in":"query"},{"schema":{"type":"string","example":"remi","description":"Organization to which the bid request belongs"},"required":false,"description":"Organization to which the bid request belongs","name":"organizationId","in":"query"}],"responses":{"200":{"description":"Projects retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}},"required":["projects"],"example":{"projects":[{"id":12345,"phase":{"phaseType":"pending_ntp","phaseStartDate":"2024-01-01T00:00:00.000Z"},"deadline":"2024-01-01T00:00:00.000Z","completedDate":"2024-01-01T00:00:00.000Z","createdDate":"2024-01-01T00:00:00.000Z","updatedDate":"2024-01-01T00:00:00.000Z","category":"full_roof","installScheduledAt":"2024-01-01T00:00:00.000Z","installStartedAt":"2024-01-01T00:00:00.000Z","installCompletedAt":"2024-01-01T00:00:00.000Z","estimatedProductionDays":10,"projectStatus":"done","cancellationReason":"on_hold_for_60_days"}]},"description":"Response containing list of projects accessible by the current user"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Forbidden"],"example":"Forbidden","description":"Error message indicating access is denied"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}},"/v0/claim-intro":{"get":{"summary":"Get claim intro","description":"Returns homeowner-facing claim-intro data for a tokenized claim link. Authorized solely by the per-claim access token (sent as the `x-claim-token` header); every access miss returns an identical 404 to avoid an enumeration oracle.","operationId":"getClaimIntro","tags":["Claim"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"example":"8f14e45fceea167a5a36dedd4bea2543","description":"Per-claim access token from the homeowner's claim-intro link."},"required":true,"description":"Per-claim access token from the homeowner's claim-intro link.","name":"x-claim-token","in":"header"}],"responses":{"200":{"description":"Claim intro retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"firstName":{"type":"string"},"address":{"type":"string","minLength":1},"claimNumber":{"type":"string","minLength":1}},"required":["address","claimNumber"]},"rep":{"type":"object","properties":{"name":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"type":"string"}},"required":["name"]}},"required":["customer","rep"],"description":"Homeowner-facing claim-intro data (customer details and assigned rep)."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Invalid email format","Phone number is required"],"description":"Array of validation error messages"}},"required":["errors"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Unauthorized"],"example":"Unauthorized","description":"Error message indicating authentication is required"}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Not Found"],"example":"Not Found","description":"Error message indicating the resource was not found"}},"required":["error"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"description":"Indicates the request failed"},"error":{"type":"string","enum":["Internal Server Error"],"example":"Internal Server Error","description":"Error message indicating a server-side error occurred"}},"required":["success","error"]}}}}}}}}}