Download OpenAPI specification:Download
Invoice API
Get a list of invoices
Success
Error Response
{- "data": [
- {
- "companyId": "2POMkDK9LZNw3BP0GBGoExejWylYq1",
- "locationId": "O8MqwQ1X3L5Ryax4OanNK2lGxerYAz",
- "status": "sent",
- "description": "This is the test invoice",
- "comments": "These are the invoice comments",
- "name": "Test User",
- "email": "testuser@roadsync.com",
- "phone": "4041231234",
- "customFields": {
- "mileage": "10000"
}, - "shiftId": "ejX52DZVG8A0MB1X8vrkoqwWlJpY6m",
- "id": "jX52DZVG8A0MB1b1bgrkoqwWlJpY6m",
- "invoiceNumber": 322943,
- "token": "ff0jfbyg",
- "lineItems": [
- {
- "productId": "AVeGYqb0d7MJpaD2xB69rlxDOZ8Nmo",
- "description": "The line item",
- "amount": 200,
- "isTaxable": false
}
], - "grandTotal": 200,
- "createdAt": "2022-04-12T17:28:45.941903-04:00",
- "updatedAt": "2022-04-12T17:28:48.442134-04:00",
- "depositStatus": "completed"
}
]
}
Create an invoice.
Created
Error Response
{- "locationId": "O8MqwQ1X3L5Ryax4OanNK2lGxerYA8",
- "companyId": "2POMkDK9LZNw3BP0GBGoExejWylYq0",
- "lineItems": [
- {
- "productId": "8Gdahuy5Nw3BI86BNgtdylYq0",
- "description": "Service charge",
- "amount": 200,
- "isTaxable": true
}
], - "phone": "4041231234",
- "email": "testuser@roadsync.com",
- "name": "John Doe",
- "customFields": {
- "mileage": "1000"
}, - "shiftId": "kNbRqo6QJjLnxa75yBPzpDZ193MlmA",
- "comments": "These are the comments"
}
{- "data": {
- "companyId": "2POMkDK9LZNw3BP0GBGoExejWylYq1",
- "locationId": "O8MqwQ1X3L5Ryax4OanNK2lGxerYAz",
- "status": "sent",
- "description": "This is the test invoice",
- "comments": "These are the invoice comments",
- "name": "Test User",
- "email": "testuser@roadsync.com",
- "phone": "4041231234",
- "customFields": {
- "mileage": "10000"
}, - "shiftId": "ejX52DZVG8A0MB1X8vrkoqwWlJpY6m",
- "id": "jX52DZVG8A0MB1b1bgrkoqwWlJpY6m",
- "invoiceNumber": 322943,
- "token": "ff0jfbyg",
- "lineItems": [
- {
- "productId": "AVeGYqb0d7MJpaD2xB69rlxDOZ8Nmo",
- "description": "The line item",
- "amount": 200,
- "isTaxable": false
}
], - "grandTotal": 200,
- "createdAt": "2022-04-12T17:28:45.941903-04:00",
- "updatedAt": "2022-04-12T17:28:48.442134-04:00",
- "authorizedAt": "2022-04-12T17:28:48.442134-04:00",
- "depositStatus": "completed"
}
}
{- "data": {
- "companyId": "2POMkDK9LZNw3BP0GBGoExejWylYq1",
- "locationId": "O8MqwQ1X3L5Ryax4OanNK2lGxerYAz",
- "status": "sent",
- "description": "This is the test invoice",
- "comments": "These are the invoice comments",
- "name": "Test User",
- "email": "testuser@roadsync.com",
- "phone": "4041231234",
- "customFields": {
- "mileage": "10000"
}, - "shiftId": "ejX52DZVG8A0MB1X8vrkoqwWlJpY6m",
- "id": "jX52DZVG8A0MB1b1bgrkoqwWlJpY6m",
- "invoiceNumber": 322943,
- "token": "ff0jfbyg",
- "lineItems": [
- {
- "productId": "AVeGYqb0d7MJpaD2xB69rlxDOZ8Nmo",
- "description": "The line item",
- "amount": 200,
- "isTaxable": false
}
], - "grandTotal": 200,
- "createdAt": "2022-04-12T17:28:45.941903-04:00",
- "updatedAt": "2022-04-12T17:28:48.442134-04:00",
- "authorizedAt": "2022-04-12T17:28:48.442134-04:00",
- "depositStatus": "completed"
}
}
Update invoice fields. Only the passed in fields will be updated on the invoice.
Success
Error Response
{- "lineItems": [
- {
- "productId": null,
- "description": "string",
- "amount": 0,
- "isTaxable": true,
- "displayOrder": 0
}
], - "name": "string",
- "email": "string",
- "phone": "string",
- "description": "string",
- "comments": "string"
}
{- "data": {
- "companyId": "2POMkDK9LZNw3BP0GBGoExejWylYq1",
- "locationId": "O8MqwQ1X3L5Ryax4OanNK2lGxerYAz",
- "status": "sent",
- "description": "This is the test invoice",
- "comments": "These are the invoice comments",
- "name": "Test User",
- "email": "testuser@roadsync.com",
- "phone": "4041231234",
- "customFields": {
- "mileage": "10000"
}, - "shiftId": "ejX52DZVG8A0MB1X8vrkoqwWlJpY6m",
- "id": "jX52DZVG8A0MB1b1bgrkoqwWlJpY6m",
- "invoiceNumber": 322943,
- "token": "ff0jfbyg",
- "lineItems": [
- {
- "productId": "AVeGYqb0d7MJpaD2xB69rlxDOZ8Nmo",
- "description": "The line item",
- "amount": 200,
- "isTaxable": false
}
], - "grandTotal": 200,
- "createdAt": "2022-04-12T17:28:45.941903-04:00",
- "updatedAt": "2022-04-12T17:28:48.442134-04:00",
- "authorizedAt": "2022-04-12T17:28:48.442134-04:00",
- "depositStatus": "completed"
}
}
Send a URL to view the invoice and make payment through Remote Checkout.
Success
Error Response
{- "email": "string",
- "phone": "string"
}
{- "errors": [
- {
- "code": "processing_error"
}
]
}
Creates a clone of the specified invoice.
Success
Error Response
{- "data": {
- "companyId": "2POMkDK9LZNw3BP0GBGoExejWylYq1",
- "locationId": "O8MqwQ1X3L5Ryax4OanNK2lGxerYAz",
- "status": "sent",
- "description": "This is the test invoice",
- "comments": "These are the invoice comments",
- "name": "Test User",
- "email": "testuser@roadsync.com",
- "phone": "4041231234",
- "customFields": {
- "mileage": "10000"
}, - "shiftId": "ejX52DZVG8A0MB1X8vrkoqwWlJpY6m",
- "id": "jX52DZVG8A0MB1b1bgrkoqwWlJpY6m",
- "invoiceNumber": 322943,
- "token": "ff0jfbyg",
- "lineItems": [
- {
- "productId": "AVeGYqb0d7MJpaD2xB69rlxDOZ8Nmo",
- "description": "The line item",
- "amount": 200,
- "isTaxable": false
}
], - "grandTotal": 200,
- "createdAt": "2022-04-12T17:28:45.941903-04:00",
- "updatedAt": "2022-04-12T17:28:48.442134-04:00",
- "authorizedAt": "2022-04-12T17:28:48.442134-04:00",
- "depositStatus": "completed"
}
}
Refund the specified amount for a paid invoice. This can only be done for invoices that were paid by credit card.
Success
Error Response
{- "amount": 0
}
{- "errors": [
- {
- "code": "processing_error"
}
]
}
Attach a file to an invoice. Must be in PDF, PNG, or JPG format.
Uploaded
Error Response
{- "errors": [
- {
- "code": "processing_error"
}
]
}