Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.
Update an invoice
PUT
/api/v1/invoices/{id}
const url = 'https://api.pitch2sale.com/api/v1/invoices/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"line_items":[{"item_id":"example","item_name":"example","description":"","quantity":1,"unit_price":1,"tax_percent":1,"total":1}],"due_date":"example","currency":"example","notes":"example","internal_notes":"example","client_notes":"example","terms":"example","discount_percent":1,"discount_value":1,"discount_type":"percent","tax_percent":1,"is_recurring":true,"recurring_interval":"weekly","custom_bank_detail":"example","bank_detail_id":"example","bill_to_name":"example","bill_to_company":"example","bill_to_address":"example","bill_from_name":"example","bill_from_address":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.pitch2sale.com/api/v1/invoices/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "line_items": [ { "item_id": "example", "item_name": "example", "description": "", "quantity": 1, "unit_price": 1, "tax_percent": 1, "total": 1 } ], "due_date": "example", "currency": "example", "notes": "example", "internal_notes": "example", "client_notes": "example", "terms": "example", "discount_percent": 1, "discount_value": 1, "discount_type": "percent", "tax_percent": 1, "is_recurring": true, "recurring_interval": "weekly", "custom_bank_detail": "example", "bank_detail_id": "example", "bill_to_name": "example", "bill_to_company": "example", "bill_to_address": "example", "bill_from_name": "example", "bill_from_address": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
line_items
currency
string
discount_percent
number
discount_value
number
discount_type
string
tax_percent
number
is_recurring
boolean
Responses
Section titled “Responses”OK
Validation failed
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}Authentication required or token invalid
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}Role permission or token scope missing
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}Rate limit exceeded
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}