> For the complete documentation index, see [llms.txt](https://help.paintscout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.paintscout.com/developers/invoices.md).

# Invoices

## GET /invoices

> List Invoices

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceSearchResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":false,"description":"A unique ID for the Invoice."},"number":{"type":"number","description":"The Number of the Invoice"},"status":{"type":"string","description":"The status of this invoice"},"hourlyRate":{"type":"number","description":"The Hourly Rate of the Invoice"},"contactId":{"type":"string","deprecated":true,"description":"This field is deprecated. Use contact.id instead"},"contact":{"$ref":"#/components/schemas/Contact"},"billingContact":{"$ref":"#/components/schemas/Contact"},"dates":{"type":"object","additionalProperties":false,"description":"important dates about this invoice","properties":{"quote":{"type":"number","description":"The date the invoice was create"},"sent":{"type":"number","description":"The date the invoice was most recently sent"},"viewed":{"type":"number","description":"The date the invoice was most recently viewed"},"accepted":{"type":"number","description":"The date the invoice was accepted"},"declined":{"type":"number","description":"The date the invoice was declined"}}},"jobAddress":{"type":"object","additionalProperties":false,"description":"The Job Address/Identifier of this invoice","properties":{"identifier":{"type":"string","description":"The free-form job identifier of this invoice"},"address":{"type":"string","description":"The address component of the job address"},"city":{"type":"string","description":"The city component of the job address"},"state":{"type":"string","description":"The state component of the job address"},"zip":{"type":"string","description":"The zip code component of the job address"}}},"parentQuoteId":{"type":"string","description":"The unique ID of the quote that this invoice was created from if available"},"parentQuoteNumber":{"type":"number","description":"The quote number of the quote that this invoice was created from if available"},"dealId":{"type":"string","description":"The unique ID of the deal associated with this invoice"},"quoteType":{"type":"object","additionalProperties":false,"description":"The Invoice Type of this invoice","properties":{"id":{"type":"string","description":"The unique ID of the Invoice Type"},"label":{"type":"string","description":"The text used to describe this Invoice Type"}}},"quoteTemplate":{"type":"object","additionalProperties":false,"description":"The Invoice Template that was made to use this invoice","properties":{"id":{"type":"string","description":"The unique ID of the Invoice Template"},"label":{"type":"string","description":"The label of the Invoice Template"}}},"totalAdjustment":{"type":"object","additionalProperties":false,"description":"The manual total adjustment applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the adjustment. Omitted if the adjustment is not a percentage"},"total":{"type":"number","description":"The calculated amount of the adjustment of the sub-total"},"description":{"type":"string","description":"The description of the adjustment"}}},"discount":{"type":"object","additionalProperties":false,"description":"The discount applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the discount. Omitted if the discount is not a percentage"},"total":{"type":"number","description":"The calculated amount of the discount of the sub-total"},"description":{"type":"string","description":"The description of the discount"}}},"tax":{"type":"object","additionalProperties":false,"description":"The tax applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied"},"description":{"type":"string","description":"The description of the tax"}}},"totals":{"type":"object","additionalProperties":false,"description":"The totals of the invoice","properties":{"price":{"type":"number","description":"The sub-total price of the invoice"},"laborPrice":{"type":"number","description":"The labor component of the sub-total"},"materialsPrice":{"type":"number","description":"The materials component of the sub-total"},"additionalWorkLaborPrice":{"type":"number","description":"The additional work labor component of the total"},"additionalWorkMaterialsPrice":{"type":"number","description":"The additional work materials component of the total"},"afterAdjustment":{"type":"number","description":"The price after sub-total adjustment of the invoice"},"afterDiscount":{"type":"number","description":"The price after discount of the invoice"},"afterTax":{"type":"number","description":"The after tax price of the invoice"},"hours":{"type":"number","description":"The number of hours of the invoice"}}},"source":{"$ref":"#/components/schemas/Source"},"owner":{"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Tags associated with this Invoice","items":{"type":"string"}}}},"Contact":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the Contact. Ignored when creating & updating contacts"},"firstName":{"type":"string","nullable":true,"description":"The First Name of the Contact."},"lastName":{"type":"string","nullable":true,"description":"The Last Name of the Contact"},"secondaryFirstName":{"type":"string","nullable":true,"description":"The secondary First Name of the Contact"},"secondaryLastName":{"type":"string","nullable":true,"description":"The secondary Last Name of the Contact"},"company":{"type":"string","nullable":true,"description":"The name of the Company this Contact is associated with"},"email":{"type":"string","nullable":true,"description":"The email address of this Contact"},"alternateEmail":{"type":"string","nullable":true,"description":"The alternate email address of this Contact"},"phoneNumber":{"type":"string","nullable":true,"description":"The phone number of this Contact"},"phoneNumberExt":{"type":"string","nullable":true,"description":"The phone number extension of this Contact"},"alternatePhoneNumber":{"type":"string","nullable":true,"description":"The alternate phone number of this Contact"},"alternatePhoneNumberExt":{"type":"string","nullable":true,"description":"The alternate phone number extension of this Contact"},"preferredContactMethod":{"type":"string","nullable":true,"description":"The preferred contact method for this Contact"},"address":{"type":"string","nullable":true,"description":"The address of this Contact"},"city":{"type":"string","nullable":true,"description":"The city of this Contact"},"state":{"type":"string","nullable":true,"description":"The state of this Contact"},"zip":{"type":"string","nullable":true,"description":"The zip or postal code of this Contact"},"leadSource":{"type":"string","nullable":true,"description":"The lead source of this Contact"},"source":{"$ref":"#/components/schemas/Source"},"owner":{"type":"object","nullable":true,"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"note":{"type":"string","nullable":true,"description":"A note about this Contact"},"tags":{"type":"array","description":"Tags associated with this Contact","items":{"type":"string"}}}},"Source":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":true,"description":"The ID of the entity on the other side"},"provider":{"type":"string","nullable":true,"description":"The name of the provider this entity came from"}}},"Owner":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique user ID"},"firstName":{"type":"string","description":"The first name of the user"},"lastName":{"type":"string","description":"The last name of the user"},"title":{"type":"string","description":"The job title of the user"},"email":{"type":"string","description":"The email address of the user"},"phoneNumber":{"type":"string","description":"The phone number of the user"},"phoneExtension":{"type":"string","description":"The phone extension of the user"}}},"Timestamp":{"type":"object","additionalProperties":false,"properties":{"created":{"type":"number","description":"The timestamp when this entity was created"},"updated":{"type":"number","description":"The timestamp when this entity was last updated"}}},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices":{"get":{"summary":"List Invoices","operationId":"listInvoices","tags":["Invoices"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","format":"int32","minimum":1}},{"name":"perPage","in":"query","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}},{"name":"query","in":"query","allowReserved":true,"schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"sortDir","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"workOrder","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of invoices","content":{"application/json":{"schema":{"type":"object","properties":{"totalRows":{"type":"number"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSearchResult"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /invoices

> Create Invoice

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceUpdate":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":false,"description":"A unique ID for the Invoice. Ignored when creating & updating invoices."},"number":{"type":"number","description":"The Number of the Invoice"},"status":{"type":"string","nullable":true,"description":"The status of this invoice"},"hourlyRate":{"type":"number","description":"The Hourly Rate of the Invoice"},"contactId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use contact.id instead"},"contact":{"$ref":"#/components/schemas/Contact"},"billingContact":{"$ref":"#/components/schemas/Contact"},"dates":{"type":"object","additionalProperties":false,"description":"important dates about this invoice","properties":{"quote":{"type":"number","description":"The date the invoice was created"},"sent":{"type":"number","description":"The date the invoice was most recently sent"},"viewed":{"type":"number","description":"The date the invoice was most recently viewed"},"accepted":{"type":"number","description":"The date the invoice was accepted"},"declined":{"type":"number","description":"The date the invoice was declined"}}},"jobAddress":{"type":"object","additionalProperties":false,"description":"The Job Address/Identifier of this invoice","properties":{"identifier":{"type":"string","nullable":true,"description":"The free-form job identifier of this invoice"},"address":{"type":"string","nullable":true,"description":"The address component of the job address"},"city":{"type":"string","nullable":true,"description":"The city component of the job address"},"state":{"type":"string","nullable":true,"description":"The state component of the job address"},"zip":{"type":"string","nullable":true,"description":"The zip code component of the job address"}}},"parentQuoteId":{"type":"string","nullable":true,"description":"The unique ID of the quote that this invoice was created from if available"},"parentQuoteNumber":{"type":"number","description":"The quote number of the quote that this invoice was created from if available"},"dealId":{"type":"string","nullable":true,"description":"The unique ID of the deal associated with this invoice"},"quoteTypeId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"quoteType":{"type":"object","additionalProperties":false,"description":"The Invoice Type of this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Type"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"label":{"type":"string","nullable":true,"description":"The text used to describe this Invoice Type"}}},"quoteTemplateId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"quoteTemplate":{"type":"object","additionalProperties":false,"description":"The Invoice Template that was made to use this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Template"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"label":{"type":"string","nullable":true,"description":"The label of the Invoice Template"}}},"items":{"type":"array","description":"The items that make up this invoice","items":{"$ref":"#/components/schemas/InvoiceItem"}},"totalAdjustment":{"type":"object","additionalProperties":false,"description":"The manual total adjustment applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the adjustment. Omitted if the adjustment is not a percentage"},"total":{"type":"number","description":"The calculated amount of the adjustment of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the adjustment"}}},"discount":{"type":"object","additionalProperties":false,"description":"The discount applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the discount. Omitted if the discount is not a percentage"},"total":{"type":"number","description":"The calculated amount of the discount of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the discount"}}},"tax":{"type":"object","additionalProperties":false,"description":"The tax applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied"},"description":{"type":"string","nullable":true,"description":"The description of the tax"},"details":{"type":"array","description":"The detailed tax breakdown by rate","items":{"type":"object","additionalProperties":false,"properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied at this rate"},"description":{"type":"string","nullable":true,"description":"The description of the tax at this rate"}}}}}},"terms":{"type":"string","nullable":true,"description":"The terms/contract associated with this invoice"},"estimatorNotes":{"type":"string","nullable":true,"description":"The estimator notes associated with this invoice"},"clientNote":{"type":"string","nullable":true,"description":"The client note associated with this invoice"},"crewNote":{"type":"string","nullable":true,"description":"The crew note associated with this invoice"},"totals":{"type":"object","additionalProperties":false,"description":"The totals of the invoice","properties":{"price":{"type":"number","description":"The sub-total price of the invoice"},"laborPrice":{"type":"number","description":"The labor component of the sub-total"},"materialsPrice":{"type":"number","description":"The materials component of the sub-total"},"additionalWorkLaborPrice":{"type":"number","description":"The additional work labor component of the total"},"additionalWorkMaterialsPrice":{"type":"number","description":"The additional work materials component of the total"},"afterAdjustment":{"type":"number","description":"The price after sub-total adjustment of the invoice"},"afterDiscount":{"type":"number","description":"The price after discount of the invoice"},"afterTax":{"type":"number","description":"The after tax price of the invoice"},"hours":{"type":"number","description":"The number of hours of the invoice"}}},"urls":{"type":"object","additionalProperties":false,"description":"Customer-View Links to this invoice and work order","properties":{"invoice":{"type":"string","description":"A link to this invoice"},"workOrder":{"type":"string","description":"A link to this work order"}}},"source":{"$ref":"#/components/schemas/Source"},"owner":{"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Tags associated with this Invoice","items":{"type":"string"}},"tagDetails":{"type":"array","description":"Detailed tag information associated with this Quote","items":{"$ref":"#/components/schemas/TagDetail"}}}},"Contact":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the Contact. Ignored when creating & updating contacts"},"firstName":{"type":"string","nullable":true,"description":"The First Name of the Contact."},"lastName":{"type":"string","nullable":true,"description":"The Last Name of the Contact"},"secondaryFirstName":{"type":"string","nullable":true,"description":"The secondary First Name of the Contact"},"secondaryLastName":{"type":"string","nullable":true,"description":"The secondary Last Name of the Contact"},"company":{"type":"string","nullable":true,"description":"The name of the Company this Contact is associated with"},"email":{"type":"string","nullable":true,"description":"The email address of this Contact"},"alternateEmail":{"type":"string","nullable":true,"description":"The alternate email address of this Contact"},"phoneNumber":{"type":"string","nullable":true,"description":"The phone number of this Contact"},"phoneNumberExt":{"type":"string","nullable":true,"description":"The phone number extension of this Contact"},"alternatePhoneNumber":{"type":"string","nullable":true,"description":"The alternate phone number of this Contact"},"alternatePhoneNumberExt":{"type":"string","nullable":true,"description":"The alternate phone number extension of this Contact"},"preferredContactMethod":{"type":"string","nullable":true,"description":"The preferred contact method for this Contact"},"address":{"type":"string","nullable":true,"description":"The address of this Contact"},"city":{"type":"string","nullable":true,"description":"The city of this Contact"},"state":{"type":"string","nullable":true,"description":"The state of this Contact"},"zip":{"type":"string","nullable":true,"description":"The zip or postal code of this Contact"},"leadSource":{"type":"string","nullable":true,"description":"The lead source of this Contact"},"source":{"$ref":"#/components/schemas/Source"},"owner":{"type":"object","nullable":true,"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"note":{"type":"string","nullable":true,"description":"A note about this Contact"},"tags":{"type":"array","description":"Tags associated with this Contact","items":{"type":"string"}}}},"Source":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":true,"description":"The ID of the entity on the other side"},"provider":{"type":"string","nullable":true,"description":"The name of the provider this entity came from"}}},"Owner":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique user ID"},"firstName":{"type":"string","description":"The first name of the user"},"lastName":{"type":"string","description":"The last name of the user"},"title":{"type":"string","description":"The job title of the user"},"email":{"type":"string","description":"The email address of the user"},"phoneNumber":{"type":"string","description":"The phone number of the user"},"phoneExtension":{"type":"string","description":"The phone extension of the user"}}},"Timestamp":{"type":"object","additionalProperties":false,"properties":{"created":{"type":"number","description":"The timestamp when this entity was created"},"updated":{"type":"number","description":"The timestamp when this entity was last updated"}}},"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"TagDetail":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The id of the tag"},"label":{"type":"string","description":"The label of the tag"},"deleted":{"type":"boolean","description":"Whether the tag has been deleted"},"updated":{"type":"number","description":"The last updated timestamp of the tag"}}},"Invoice":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":false,"description":"A unique ID for the Invoice. Ignored when creating & updating invoices."},"number":{"type":"number","description":"The Number of the Invoice"},"status":{"type":"string","nullable":true,"description":"The status of this invoice"},"hourlyRate":{"type":"number","description":"The Hourly Rate of the Invoice"},"contactId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use contact.id instead"},"contact":{"$ref":"#/components/schemas/Contact"},"billingContact":{"$ref":"#/components/schemas/Contact"},"dates":{"type":"object","additionalProperties":false,"description":"important dates about this invoice","properties":{"quote":{"type":"number","description":"The date the invoice was created"},"sent":{"type":"number","description":"The date the invoice was most recently sent"},"viewed":{"type":"number","description":"The date the invoice was most recently viewed"},"accepted":{"type":"number","description":"The date the invoice was accepted"},"declined":{"type":"number","description":"The date the invoice was declined"}}},"jobAddress":{"type":"object","additionalProperties":false,"description":"The Job Address/Identifier of this invoice","properties":{"identifier":{"type":"string","nullable":true,"description":"The free-form job identifier of this invoice"},"address":{"type":"string","nullable":true,"description":"The address component of the job address"},"city":{"type":"string","nullable":true,"description":"The city component of the job address"},"state":{"type":"string","nullable":true,"description":"The state component of the job address"},"zip":{"type":"string","nullable":true,"description":"The zip code component of the job address"}}},"parentQuoteId":{"type":"string","nullable":true,"description":"The unique ID of the quote that this invoice was created from if available"},"parentQuoteNumber":{"type":"number","description":"The quote number of the quote that this invoice was created from if available"},"dealId":{"type":"string","nullable":true,"description":"The unique ID of the deal associated with this invoice"},"quoteTypeId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"quoteType":{"type":"object","additionalProperties":false,"description":"The Invoice Type of this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Type"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"label":{"type":"string","nullable":true,"description":"The text used to describe this Invoice Type"}}},"quoteTemplateId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"quoteTemplate":{"type":"object","additionalProperties":false,"description":"The Invoice Template that was made to use this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Template"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"label":{"type":"string","nullable":true,"description":"The label of the Invoice Template"}}},"items":{"type":"array","description":"The items that make up this invoice","items":{"$ref":"#/components/schemas/InvoiceItem"}},"payments":{"type":"array","description":"Payments applied to this invoice","items":{"$ref":"#/components/schemas/Payment"}},"totalAdjustment":{"type":"object","additionalProperties":false,"description":"The manual total adjustment applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the adjustment. Omitted if the adjustment is not a percentage"},"total":{"type":"number","description":"The calculated amount of the adjustment of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the adjustment"}}},"discount":{"type":"object","additionalProperties":false,"description":"The discount applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the discount. Omitted if the discount is not a percentage"},"total":{"type":"number","description":"The calculated amount of the discount of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the discount"}}},"tax":{"type":"object","additionalProperties":false,"description":"The tax applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied"},"description":{"type":"string","nullable":true,"description":"The description of the tax"},"details":{"type":"array","description":"The detailed tax breakdown by rate","items":{"type":"object","additionalProperties":false,"properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied at this rate"},"description":{"type":"string","nullable":true,"description":"The description of the tax at this rate"}}}}}},"terms":{"type":"string","nullable":true,"description":"The terms/contract associated with this invoice"},"estimatorNotes":{"type":"string","nullable":true,"description":"The estimator notes associated with this invoice"},"clientNote":{"type":"string","nullable":true,"description":"The client note associated with this invoice"},"crewNote":{"type":"string","nullable":true,"description":"The crew note associated with this invoice"},"totals":{"type":"object","additionalProperties":false,"description":"The totals of the invoice","properties":{"price":{"type":"number","description":"The sub-total price of the invoice"},"laborPrice":{"type":"number","description":"The labor component of the sub-total"},"materialsPrice":{"type":"number","description":"The materials component of the sub-total"},"additionalWorkLaborPrice":{"type":"number","description":"The additional work labor component of the total"},"additionalWorkMaterialsPrice":{"type":"number","description":"The additional work materials component of the total"},"afterAdjustment":{"type":"number","description":"The price after sub-total adjustment of the invoice"},"afterDiscount":{"type":"number","description":"The price after discount of the invoice"},"afterTax":{"type":"number","description":"The after tax price of the invoice"},"hours":{"type":"number","description":"The number of hours of the invoice"}}},"urls":{"type":"object","additionalProperties":false,"description":"Customer-View Links to this invoice and work order","properties":{"invoice":{"type":"string","description":"A link to this invoice"},"workOrder":{"type":"string","description":"A link to this work order"}}},"source":{"$ref":"#/components/schemas/Source"},"owner":{"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Tags associated with this Invoice","items":{"type":"string"}},"tagDetails":{"type":"array","description":"Detailed tag information associated with this Quote","items":{"$ref":"#/components/schemas/TagDetail"}}}},"Payment":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","nullable":true,"description":"The type of payment method"},"amount":{"type":"number","description":"The amount paid on this payment"},"date":{"type":"number","description":"The date the payment was made"},"note":{"type":"string","nullable":true,"description":"The note associated with this payment"},"deposit":{"type":"boolean","description":"Whether this payment is a deposit or not"}}},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices":{"post":{"summary":"Create Invoice","operationId":"createInvoice","tags":["Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"description":"Details about the new Invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /invoices/{id}

> Retrieve Invoice

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Invoice":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":false,"description":"A unique ID for the Invoice. Ignored when creating & updating invoices."},"number":{"type":"number","description":"The Number of the Invoice"},"status":{"type":"string","nullable":true,"description":"The status of this invoice"},"hourlyRate":{"type":"number","description":"The Hourly Rate of the Invoice"},"contactId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use contact.id instead"},"contact":{"$ref":"#/components/schemas/Contact"},"billingContact":{"$ref":"#/components/schemas/Contact"},"dates":{"type":"object","additionalProperties":false,"description":"important dates about this invoice","properties":{"quote":{"type":"number","description":"The date the invoice was created"},"sent":{"type":"number","description":"The date the invoice was most recently sent"},"viewed":{"type":"number","description":"The date the invoice was most recently viewed"},"accepted":{"type":"number","description":"The date the invoice was accepted"},"declined":{"type":"number","description":"The date the invoice was declined"}}},"jobAddress":{"type":"object","additionalProperties":false,"description":"The Job Address/Identifier of this invoice","properties":{"identifier":{"type":"string","nullable":true,"description":"The free-form job identifier of this invoice"},"address":{"type":"string","nullable":true,"description":"The address component of the job address"},"city":{"type":"string","nullable":true,"description":"The city component of the job address"},"state":{"type":"string","nullable":true,"description":"The state component of the job address"},"zip":{"type":"string","nullable":true,"description":"The zip code component of the job address"}}},"parentQuoteId":{"type":"string","nullable":true,"description":"The unique ID of the quote that this invoice was created from if available"},"parentQuoteNumber":{"type":"number","description":"The quote number of the quote that this invoice was created from if available"},"dealId":{"type":"string","nullable":true,"description":"The unique ID of the deal associated with this invoice"},"quoteTypeId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"quoteType":{"type":"object","additionalProperties":false,"description":"The Invoice Type of this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Type"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"label":{"type":"string","nullable":true,"description":"The text used to describe this Invoice Type"}}},"quoteTemplateId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"quoteTemplate":{"type":"object","additionalProperties":false,"description":"The Invoice Template that was made to use this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Template"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"label":{"type":"string","nullable":true,"description":"The label of the Invoice Template"}}},"items":{"type":"array","description":"The items that make up this invoice","items":{"$ref":"#/components/schemas/InvoiceItem"}},"payments":{"type":"array","description":"Payments applied to this invoice","items":{"$ref":"#/components/schemas/Payment"}},"totalAdjustment":{"type":"object","additionalProperties":false,"description":"The manual total adjustment applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the adjustment. Omitted if the adjustment is not a percentage"},"total":{"type":"number","description":"The calculated amount of the adjustment of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the adjustment"}}},"discount":{"type":"object","additionalProperties":false,"description":"The discount applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the discount. Omitted if the discount is not a percentage"},"total":{"type":"number","description":"The calculated amount of the discount of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the discount"}}},"tax":{"type":"object","additionalProperties":false,"description":"The tax applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied"},"description":{"type":"string","nullable":true,"description":"The description of the tax"},"details":{"type":"array","description":"The detailed tax breakdown by rate","items":{"type":"object","additionalProperties":false,"properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied at this rate"},"description":{"type":"string","nullable":true,"description":"The description of the tax at this rate"}}}}}},"terms":{"type":"string","nullable":true,"description":"The terms/contract associated with this invoice"},"estimatorNotes":{"type":"string","nullable":true,"description":"The estimator notes associated with this invoice"},"clientNote":{"type":"string","nullable":true,"description":"The client note associated with this invoice"},"crewNote":{"type":"string","nullable":true,"description":"The crew note associated with this invoice"},"totals":{"type":"object","additionalProperties":false,"description":"The totals of the invoice","properties":{"price":{"type":"number","description":"The sub-total price of the invoice"},"laborPrice":{"type":"number","description":"The labor component of the sub-total"},"materialsPrice":{"type":"number","description":"The materials component of the sub-total"},"additionalWorkLaborPrice":{"type":"number","description":"The additional work labor component of the total"},"additionalWorkMaterialsPrice":{"type":"number","description":"The additional work materials component of the total"},"afterAdjustment":{"type":"number","description":"The price after sub-total adjustment of the invoice"},"afterDiscount":{"type":"number","description":"The price after discount of the invoice"},"afterTax":{"type":"number","description":"The after tax price of the invoice"},"hours":{"type":"number","description":"The number of hours of the invoice"}}},"urls":{"type":"object","additionalProperties":false,"description":"Customer-View Links to this invoice and work order","properties":{"invoice":{"type":"string","description":"A link to this invoice"},"workOrder":{"type":"string","description":"A link to this work order"}}},"source":{"$ref":"#/components/schemas/Source"},"owner":{"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Tags associated with this Invoice","items":{"type":"string"}},"tagDetails":{"type":"array","description":"Detailed tag information associated with this Quote","items":{"$ref":"#/components/schemas/TagDetail"}}}},"Contact":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the Contact. Ignored when creating & updating contacts"},"firstName":{"type":"string","nullable":true,"description":"The First Name of the Contact."},"lastName":{"type":"string","nullable":true,"description":"The Last Name of the Contact"},"secondaryFirstName":{"type":"string","nullable":true,"description":"The secondary First Name of the Contact"},"secondaryLastName":{"type":"string","nullable":true,"description":"The secondary Last Name of the Contact"},"company":{"type":"string","nullable":true,"description":"The name of the Company this Contact is associated with"},"email":{"type":"string","nullable":true,"description":"The email address of this Contact"},"alternateEmail":{"type":"string","nullable":true,"description":"The alternate email address of this Contact"},"phoneNumber":{"type":"string","nullable":true,"description":"The phone number of this Contact"},"phoneNumberExt":{"type":"string","nullable":true,"description":"The phone number extension of this Contact"},"alternatePhoneNumber":{"type":"string","nullable":true,"description":"The alternate phone number of this Contact"},"alternatePhoneNumberExt":{"type":"string","nullable":true,"description":"The alternate phone number extension of this Contact"},"preferredContactMethod":{"type":"string","nullable":true,"description":"The preferred contact method for this Contact"},"address":{"type":"string","nullable":true,"description":"The address of this Contact"},"city":{"type":"string","nullable":true,"description":"The city of this Contact"},"state":{"type":"string","nullable":true,"description":"The state of this Contact"},"zip":{"type":"string","nullable":true,"description":"The zip or postal code of this Contact"},"leadSource":{"type":"string","nullable":true,"description":"The lead source of this Contact"},"source":{"$ref":"#/components/schemas/Source"},"owner":{"type":"object","nullable":true,"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"note":{"type":"string","nullable":true,"description":"A note about this Contact"},"tags":{"type":"array","description":"Tags associated with this Contact","items":{"type":"string"}}}},"Source":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":true,"description":"The ID of the entity on the other side"},"provider":{"type":"string","nullable":true,"description":"The name of the provider this entity came from"}}},"Owner":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique user ID"},"firstName":{"type":"string","description":"The first name of the user"},"lastName":{"type":"string","description":"The last name of the user"},"title":{"type":"string","description":"The job title of the user"},"email":{"type":"string","description":"The email address of the user"},"phoneNumber":{"type":"string","description":"The phone number of the user"},"phoneExtension":{"type":"string","description":"The phone extension of the user"}}},"Timestamp":{"type":"object","additionalProperties":false,"properties":{"created":{"type":"number","description":"The timestamp when this entity was created"},"updated":{"type":"number","description":"The timestamp when this entity was last updated"}}},"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"Payment":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","nullable":true,"description":"The type of payment method"},"amount":{"type":"number","description":"The amount paid on this payment"},"date":{"type":"number","description":"The date the payment was made"},"note":{"type":"string","nullable":true,"description":"The note associated with this payment"},"deposit":{"type":"boolean","description":"Whether this payment is a deposit or not"}}},"TagDetail":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The id of the tag"},"label":{"type":"string","description":"The label of the tag"},"deleted":{"type":"boolean","description":"Whether the tag has been deleted"},"updated":{"type":"number","description":"The last updated timestamp of the tag"}}},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}":{"get":{"summary":"Retrieve Invoice","operationId":"getInvoice","tags":["Invoices"],"parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}},{"name":"display","in":"query","description":"Display as either an Invoice or Work Order.","required":false,"schema":{"type":"string","enum":["quote","work-order"],"default":"quote"}}],"responses":{"200":{"description":"Details about the invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## PUT /invoices/{id}

> Update Invoice

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceUpdate":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":false,"description":"A unique ID for the Invoice. Ignored when creating & updating invoices."},"number":{"type":"number","description":"The Number of the Invoice"},"status":{"type":"string","nullable":true,"description":"The status of this invoice"},"hourlyRate":{"type":"number","description":"The Hourly Rate of the Invoice"},"contactId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use contact.id instead"},"contact":{"$ref":"#/components/schemas/Contact"},"billingContact":{"$ref":"#/components/schemas/Contact"},"dates":{"type":"object","additionalProperties":false,"description":"important dates about this invoice","properties":{"quote":{"type":"number","description":"The date the invoice was created"},"sent":{"type":"number","description":"The date the invoice was most recently sent"},"viewed":{"type":"number","description":"The date the invoice was most recently viewed"},"accepted":{"type":"number","description":"The date the invoice was accepted"},"declined":{"type":"number","description":"The date the invoice was declined"}}},"jobAddress":{"type":"object","additionalProperties":false,"description":"The Job Address/Identifier of this invoice","properties":{"identifier":{"type":"string","nullable":true,"description":"The free-form job identifier of this invoice"},"address":{"type":"string","nullable":true,"description":"The address component of the job address"},"city":{"type":"string","nullable":true,"description":"The city component of the job address"},"state":{"type":"string","nullable":true,"description":"The state component of the job address"},"zip":{"type":"string","nullable":true,"description":"The zip code component of the job address"}}},"parentQuoteId":{"type":"string","nullable":true,"description":"The unique ID of the quote that this invoice was created from if available"},"parentQuoteNumber":{"type":"number","description":"The quote number of the quote that this invoice was created from if available"},"dealId":{"type":"string","nullable":true,"description":"The unique ID of the deal associated with this invoice"},"quoteTypeId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"quoteType":{"type":"object","additionalProperties":false,"description":"The Invoice Type of this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Type"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"label":{"type":"string","nullable":true,"description":"The text used to describe this Invoice Type"}}},"quoteTemplateId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"quoteTemplate":{"type":"object","additionalProperties":false,"description":"The Invoice Template that was made to use this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Template"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"label":{"type":"string","nullable":true,"description":"The label of the Invoice Template"}}},"items":{"type":"array","description":"The items that make up this invoice","items":{"$ref":"#/components/schemas/InvoiceItem"}},"totalAdjustment":{"type":"object","additionalProperties":false,"description":"The manual total adjustment applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the adjustment. Omitted if the adjustment is not a percentage"},"total":{"type":"number","description":"The calculated amount of the adjustment of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the adjustment"}}},"discount":{"type":"object","additionalProperties":false,"description":"The discount applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the discount. Omitted if the discount is not a percentage"},"total":{"type":"number","description":"The calculated amount of the discount of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the discount"}}},"tax":{"type":"object","additionalProperties":false,"description":"The tax applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied"},"description":{"type":"string","nullable":true,"description":"The description of the tax"},"details":{"type":"array","description":"The detailed tax breakdown by rate","items":{"type":"object","additionalProperties":false,"properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied at this rate"},"description":{"type":"string","nullable":true,"description":"The description of the tax at this rate"}}}}}},"terms":{"type":"string","nullable":true,"description":"The terms/contract associated with this invoice"},"estimatorNotes":{"type":"string","nullable":true,"description":"The estimator notes associated with this invoice"},"clientNote":{"type":"string","nullable":true,"description":"The client note associated with this invoice"},"crewNote":{"type":"string","nullable":true,"description":"The crew note associated with this invoice"},"totals":{"type":"object","additionalProperties":false,"description":"The totals of the invoice","properties":{"price":{"type":"number","description":"The sub-total price of the invoice"},"laborPrice":{"type":"number","description":"The labor component of the sub-total"},"materialsPrice":{"type":"number","description":"The materials component of the sub-total"},"additionalWorkLaborPrice":{"type":"number","description":"The additional work labor component of the total"},"additionalWorkMaterialsPrice":{"type":"number","description":"The additional work materials component of the total"},"afterAdjustment":{"type":"number","description":"The price after sub-total adjustment of the invoice"},"afterDiscount":{"type":"number","description":"The price after discount of the invoice"},"afterTax":{"type":"number","description":"The after tax price of the invoice"},"hours":{"type":"number","description":"The number of hours of the invoice"}}},"urls":{"type":"object","additionalProperties":false,"description":"Customer-View Links to this invoice and work order","properties":{"invoice":{"type":"string","description":"A link to this invoice"},"workOrder":{"type":"string","description":"A link to this work order"}}},"source":{"$ref":"#/components/schemas/Source"},"owner":{"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Tags associated with this Invoice","items":{"type":"string"}},"tagDetails":{"type":"array","description":"Detailed tag information associated with this Quote","items":{"$ref":"#/components/schemas/TagDetail"}}}},"Contact":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the Contact. Ignored when creating & updating contacts"},"firstName":{"type":"string","nullable":true,"description":"The First Name of the Contact."},"lastName":{"type":"string","nullable":true,"description":"The Last Name of the Contact"},"secondaryFirstName":{"type":"string","nullable":true,"description":"The secondary First Name of the Contact"},"secondaryLastName":{"type":"string","nullable":true,"description":"The secondary Last Name of the Contact"},"company":{"type":"string","nullable":true,"description":"The name of the Company this Contact is associated with"},"email":{"type":"string","nullable":true,"description":"The email address of this Contact"},"alternateEmail":{"type":"string","nullable":true,"description":"The alternate email address of this Contact"},"phoneNumber":{"type":"string","nullable":true,"description":"The phone number of this Contact"},"phoneNumberExt":{"type":"string","nullable":true,"description":"The phone number extension of this Contact"},"alternatePhoneNumber":{"type":"string","nullable":true,"description":"The alternate phone number of this Contact"},"alternatePhoneNumberExt":{"type":"string","nullable":true,"description":"The alternate phone number extension of this Contact"},"preferredContactMethod":{"type":"string","nullable":true,"description":"The preferred contact method for this Contact"},"address":{"type":"string","nullable":true,"description":"The address of this Contact"},"city":{"type":"string","nullable":true,"description":"The city of this Contact"},"state":{"type":"string","nullable":true,"description":"The state of this Contact"},"zip":{"type":"string","nullable":true,"description":"The zip or postal code of this Contact"},"leadSource":{"type":"string","nullable":true,"description":"The lead source of this Contact"},"source":{"$ref":"#/components/schemas/Source"},"owner":{"type":"object","nullable":true,"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"note":{"type":"string","nullable":true,"description":"A note about this Contact"},"tags":{"type":"array","description":"Tags associated with this Contact","items":{"type":"string"}}}},"Source":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":true,"description":"The ID of the entity on the other side"},"provider":{"type":"string","nullable":true,"description":"The name of the provider this entity came from"}}},"Owner":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique user ID"},"firstName":{"type":"string","description":"The first name of the user"},"lastName":{"type":"string","description":"The last name of the user"},"title":{"type":"string","description":"The job title of the user"},"email":{"type":"string","description":"The email address of the user"},"phoneNumber":{"type":"string","description":"The phone number of the user"},"phoneExtension":{"type":"string","description":"The phone extension of the user"}}},"Timestamp":{"type":"object","additionalProperties":false,"properties":{"created":{"type":"number","description":"The timestamp when this entity was created"},"updated":{"type":"number","description":"The timestamp when this entity was last updated"}}},"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"TagDetail":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The id of the tag"},"label":{"type":"string","description":"The label of the tag"},"deleted":{"type":"boolean","description":"Whether the tag has been deleted"},"updated":{"type":"number","description":"The last updated timestamp of the tag"}}},"Invoice":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":false,"description":"A unique ID for the Invoice. Ignored when creating & updating invoices."},"number":{"type":"number","description":"The Number of the Invoice"},"status":{"type":"string","nullable":true,"description":"The status of this invoice"},"hourlyRate":{"type":"number","description":"The Hourly Rate of the Invoice"},"contactId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use contact.id instead"},"contact":{"$ref":"#/components/schemas/Contact"},"billingContact":{"$ref":"#/components/schemas/Contact"},"dates":{"type":"object","additionalProperties":false,"description":"important dates about this invoice","properties":{"quote":{"type":"number","description":"The date the invoice was created"},"sent":{"type":"number","description":"The date the invoice was most recently sent"},"viewed":{"type":"number","description":"The date the invoice was most recently viewed"},"accepted":{"type":"number","description":"The date the invoice was accepted"},"declined":{"type":"number","description":"The date the invoice was declined"}}},"jobAddress":{"type":"object","additionalProperties":false,"description":"The Job Address/Identifier of this invoice","properties":{"identifier":{"type":"string","nullable":true,"description":"The free-form job identifier of this invoice"},"address":{"type":"string","nullable":true,"description":"The address component of the job address"},"city":{"type":"string","nullable":true,"description":"The city component of the job address"},"state":{"type":"string","nullable":true,"description":"The state component of the job address"},"zip":{"type":"string","nullable":true,"description":"The zip code component of the job address"}}},"parentQuoteId":{"type":"string","nullable":true,"description":"The unique ID of the quote that this invoice was created from if available"},"parentQuoteNumber":{"type":"number","description":"The quote number of the quote that this invoice was created from if available"},"dealId":{"type":"string","nullable":true,"description":"The unique ID of the deal associated with this invoice"},"quoteTypeId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"quoteType":{"type":"object","additionalProperties":false,"description":"The Invoice Type of this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Type"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteType.id instead"},"label":{"type":"string","nullable":true,"description":"The text used to describe this Invoice Type"}}},"quoteTemplateId":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"quoteTemplate":{"type":"object","additionalProperties":false,"description":"The Invoice Template that was made to use this invoice","properties":{"id":{"type":"string","nullable":true,"description":"The unique ID of the Invoice Template"},"value":{"type":"string","nullable":true,"deprecated":true,"description":"This field is deprecated. Use quoteTemplate.id instead"},"label":{"type":"string","nullable":true,"description":"The label of the Invoice Template"}}},"items":{"type":"array","description":"The items that make up this invoice","items":{"$ref":"#/components/schemas/InvoiceItem"}},"payments":{"type":"array","description":"Payments applied to this invoice","items":{"$ref":"#/components/schemas/Payment"}},"totalAdjustment":{"type":"object","additionalProperties":false,"description":"The manual total adjustment applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the adjustment. Omitted if the adjustment is not a percentage"},"total":{"type":"number","description":"The calculated amount of the adjustment of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the adjustment"}}},"discount":{"type":"object","additionalProperties":false,"description":"The discount applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage of the discount. Omitted if the discount is not a percentage"},"total":{"type":"number","description":"The calculated amount of the discount of the sub-total"},"description":{"type":"string","nullable":true,"description":"The description of the discount"}}},"tax":{"type":"object","additionalProperties":false,"description":"The tax applied to the invoice","properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied"},"description":{"type":"string","nullable":true,"description":"The description of the tax"},"details":{"type":"array","description":"The detailed tax breakdown by rate","items":{"type":"object","additionalProperties":false,"properties":{"rate":{"type":"number","description":"The percentage rate of tax"},"total":{"type":"number","description":"The total amount of tax applied at this rate"},"description":{"type":"string","nullable":true,"description":"The description of the tax at this rate"}}}}}},"terms":{"type":"string","nullable":true,"description":"The terms/contract associated with this invoice"},"estimatorNotes":{"type":"string","nullable":true,"description":"The estimator notes associated with this invoice"},"clientNote":{"type":"string","nullable":true,"description":"The client note associated with this invoice"},"crewNote":{"type":"string","nullable":true,"description":"The crew note associated with this invoice"},"totals":{"type":"object","additionalProperties":false,"description":"The totals of the invoice","properties":{"price":{"type":"number","description":"The sub-total price of the invoice"},"laborPrice":{"type":"number","description":"The labor component of the sub-total"},"materialsPrice":{"type":"number","description":"The materials component of the sub-total"},"additionalWorkLaborPrice":{"type":"number","description":"The additional work labor component of the total"},"additionalWorkMaterialsPrice":{"type":"number","description":"The additional work materials component of the total"},"afterAdjustment":{"type":"number","description":"The price after sub-total adjustment of the invoice"},"afterDiscount":{"type":"number","description":"The price after discount of the invoice"},"afterTax":{"type":"number","description":"The after tax price of the invoice"},"hours":{"type":"number","description":"The number of hours of the invoice"}}},"urls":{"type":"object","additionalProperties":false,"description":"Customer-View Links to this invoice and work order","properties":{"invoice":{"type":"string","description":"A link to this invoice"},"workOrder":{"type":"string","description":"A link to this work order"}}},"source":{"$ref":"#/components/schemas/Source"},"owner":{"$ref":"#/components/schemas/Owner"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Tags associated with this Invoice","items":{"type":"string"}},"tagDetails":{"type":"array","description":"Detailed tag information associated with this Quote","items":{"$ref":"#/components/schemas/TagDetail"}}}},"Payment":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","nullable":true,"description":"The type of payment method"},"amount":{"type":"number","description":"The amount paid on this payment"},"date":{"type":"number","description":"The date the payment was made"},"note":{"type":"string","nullable":true,"description":"The note associated with this payment"},"deposit":{"type":"boolean","description":"Whether this payment is a deposit or not"}}},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}":{"put":{"summary":"Update Invoice","parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"operationId":"updateInvoice","tags":["Invoices"],"responses":{"200":{"description":"The updated invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## DELETE /invoices/{id}

> Delete Invoice

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}":{"delete":{"summary":"Delete Invoice","parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}}],"operationId":"deleteInvoice","tags":["Invoices"],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /invoices/{id}/items

> List Invoice Items

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}/items":{"get":{"summary":"List Invoice Items","operationId":"listInvoiceItems","tags":["Invoices"],"parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of invoice items","content":{"application/json":{"schema":{"type":"object","properties":{"bid":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}},"options":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}},"archived":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}},"additionalWork":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}},"pending":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /invoices/{id}/items

> Create Invoice Item

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceItemCreate":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}/items":{"post":{"summary":"Create Invoice Item","operationId":"createInvoiceItem","tags":["Invoices"],"parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItemCreate"}}}},"responses":{"200":{"description":"Details about the new Invoice Item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItem"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /invoices/{id}/items/{itemId}

> Get Invoice Item

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}/items/{itemId}":{"get":{"summary":"Get Invoice Item","operationId":"getInvoiceItem","tags":["Invoices"],"parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","description":"ID of the Invoice Item","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Details about the invoice item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItem"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## PUT /invoices/{id}/items/{itemId}

> Update Invoice Item

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"InvoiceItemUpdate":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to"}}},"InvoiceItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for the invoice item"},"name":{"type":"string","description":"The title/name for this item"},"quoteType":{"type":"string","description":"The quote type this item applies to"},"description":{"type":"string","description":"The plain text description for this item"},"descriptionHtml":{"type":"string","description":"The HTML formatted description for this item"},"price":{"type":"number","description":"The total price for this item"},"hours":{"type":"number","description":"The estimated hours for this item"},"quantity":{"type":"number","description":"The quantity of this item"},"pricePerUnit":{"type":"number","description":"The price per unit if quantity-based pricing"},"crewNote":{"type":"string","description":"Notes for the crew working on this item"},"crewNoteHtml":{"type":"string","description":"HTML formatted notes for the crew"},"clientNote":{"type":"string","description":"Notes visible to the client"},"clientNoteHtml":{"type":"string","description":"HTML formatted notes visible to the client"},"files":{"type":"array","description":"Files attached to this item","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier for the file"},"src":{"type":"string","description":"URL or path to the file"},"title":{"type":"string","description":"Title of the file"},"caption":{"type":"string","description":"Caption or description of the file"}}}},"source":{"type":"object","description":"External source information if item is from external system","properties":{"provider":{"type":"string","description":"The provider/system name"},"id":{"type":"string","description":"External system ID"},"value":{"type":"string","description":"External system value"},"label":{"type":"string","description":"External system label"}}},"section":{"type":"string","enum":["bid","options","archived","additional","pending"],"description":"The section this item belongs to","default":"bid"}},"required":["name","price"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}/items/{itemId}":{"put":{"summary":"Update Invoice Item","operationId":"updateInvoiceItem","tags":["Invoices"],"parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","description":"ID of the Invoice Item","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItemUpdate"}}}},"responses":{"200":{"description":"Updated invoice item details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItem"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## DELETE /invoices/{id}/items/{itemId}

> Delete Invoice Item

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/invoices/{id}/items/{itemId}":{"delete":{"summary":"Delete Invoice Item","operationId":"deleteInvoiceItem","tags":["Invoices"],"parameters":[{"name":"id","in":"path","description":"ID of the Invoice","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","description":"ID of the Invoice Item","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Invoice item successfully deleted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.paintscout.com/developers/invoices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
