Invoices

Invoices represent a set of jobs that are invoiced together.

The Invoice object

Properties

  • idstring

    Unique identifier for the object.

  • applyVATReverseChargeboolean

    True if the reverse charge applies.

  • archiveboolean

    True if the entity is archived.

  • clientobject

    The client.
  • currencyobject

    The currency.
  • customStatusobject

    The custom status of the invoice, if it has one. A custom status belongs to one of the statuses of the invoice and is only available with a Plus, Premium or Team subscription.
  • discountnumber

    The discount percentage.

  • documentobject

    The document configuration.
  • dueDatedate

    The due date of the invoice.

  • exchangeRatesobject

    ExchangeRates
  • filenameFormatstring

    The filename format.

  • headerstring

    The header of the invoice.

  • internalNotesarray

    Notes
  • isConflictingNumberboolean

    True if the invoice number is conflicting.

  • isPartiallyPaidboolean

    True if the invoice is partially paid.

  • issueDatedate

    The issue date of the invoice.

  • labelsarray

    The labels.
  • linesarray

    lines
  • notesstring

    The notes linked to the entity.

  • numberstring

    The invoice number.

  • paymentDatedate

    paymentDate

  • paymentsarray

    The payments
  • pinnedboolean

    True if the entity is pinned.

  • rappenRoundingboolean

    True if the rounding is in rappen (CHF currency only).

  • relatedCreditNoteIdsarray

    The ids of the related credit notes.

  • relatedToInvoiceIdstring

    The id of the related invoice (if credited).

  • sentDatedate

    The date the invoice was sent.

  • sentDateStatusobject

    The status of the sent date.

  • statusnumber

    The status of the invoice. Valid values are: 1 (draft), 2 (sent), 3 (paid), 4 (credited).

  • tax1object

    The first tax.

  • tax2object

    The second tax
  • termsstring

    The terms of the invoice.

  • totalobject

    The total of the invoice.
  • typenumber

    The type of the invoice. Valid values are: 1 (invoice), 2 (credit note), 3 (credit note with negative values).

  • userobject

    The user that created the invoice.
  • createdAtdate

    The date and time the entity was created.

  • updatedAtdate

    The date and time the entity was last updated.

invoice object

{
  "id": "6719e8737b67c75f356f97f2",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-23T07:25:55.454Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "001.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-24T06:25:55.454Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "6718a1c90e27164043ceaff6",
        "name": "Demo job",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "extraCharge": {
        "type": "percentage",
        "percentage": 0.1,
        "amount": 0
      },
      "quantity": {
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        },
        "value": 1000
      },
      "totalDetails": {
        "extraCharge": {
          "amount": 14,
          "discount": 0,
          "total": 14
        },
        "subtotal": {
          "amount": 140,
          "discount": 0,
          "total": 140
        },
        "total": 154
      },
      "group": {
        "isParent": false,
        "childLines": []
      },
      "unitCost": 0.14,
      "discount": 0,
      "lineTotal": 154,
      "notIncludeInTaxes": false,
      "matches": [],
      "groupMatches": false,
      "id": "6719e8737b67c75f356f97f7"
    }
  ],
  "number": "001",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "sentDate": "2024-10-28T12:48:36.516Z",
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 154,
    "subtotalTaxable": 154,
    "subtotalWithoutTaxes": 154,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 32.34,
      "value": 0.21
    },
    "tax2": null,
    "total": 186.34
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce912e",
    "name": "Cédric Doe"
  },
  "createdAt": "2024-10-24T06:25:55.454Z",
  "updatedAt": "2024-10-28T12:48:39.465Z"
}

GET/v2/invoices

List all invoices

This endpoint allows you to retrieve all the invoices.

Filters

All the filters are optional and can be combined. See Pagination for the rules shared by all the list endpoints (multiple values, dates, keywords).

  • idstring

    Comma-separated list of invoice ids.

  • statusstring

    Comma-separated list of statuses. Each value is a status of the invoice (1 (draft), 2 (sent), 3 (paid), 4 (credited)) or the id of a custom status.

  • typestring

    Comma-separated list of types: 1 (invoice), 2 (credit note with a positive amount), 3 (credit note with a negative amount).

  • numberstring

    Only the invoices whose number contains this text (not case sensitive).

  • client.idstring

    Comma-separated list of client ids.

  • projectManager.idstring

    Comma-separated list of user ids. Only the invoices of the clients managed by these users (project managers) are returned.

  • lines.job.idstring

    Comma-separated list of job ids. Only the invoices that have a line for one of these jobs are returned.

  • service.idstring

    Comma-separated list of service ids. Only the invoices that have a line for one of these services are returned.

  • languagePair.idstring

    Comma-separated list of language pair ids. Only the invoices that have a line for one of these language pairs are returned.

  • labels.idstring

    Comma-separated list of label ids. The invoices that have at least one of these labels are returned (see labels.all).

  • labels.allboolean

    Set to true to return only the invoices that have all the labels of labels.id.

  • currencystring

    The currency code (ISO, e.g., EUR).

  • totalnumber

    Only the invoices with this exact total.

  • archiveboolean

    true to retrieve only the archived invoices, false to exclude them. If not provided, both are returned.

  • issueDateFromdate

    Only the invoices whose issue date is on or after this date (ISO 8601).

  • issueDateTodate

    Only the invoices whose issue date is before this date (ISO 8601).

  • dueDateFromdate

    Only the invoices whose due date is on or after this date (ISO 8601).

  • dueDateTodate

    Only the invoices whose due date is before this date (ISO 8601).

  • paymentDateFromdate

    Only the invoices whose payment date is on or after this date (ISO 8601).

  • paymentDateTodate

    Only the invoices whose payment date is before this date (ISO 8601).

Sorting

  • sortstring

    The field to sort by. One of: number, status, client.name, issueDate, dueDate, paymentDate, total. The default is issueDate.

  • directionstring

    The sort direction: asc or desc. The default is desc.

Request

GET
/v2/invoices
curl -G https://api.lsp.expert/v2/invoices \
  -u {key}: 

Response

{
  "items": [{
    "id": "6719e8737b67c75f356f97f2",
    "applyVATReverseCharge": false,
    "archive": false,
    "client": {
      "id": "6718a1350e27164043ce9e80",
      "name": "Microsoft",
      "address": {
        "name": "Microsoft"
      }
    },
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "discount": 0,
    "document": {
      "id": "6718a0b50e27164043ce915a",
      "name": "English"
    },
    "dueDate": "2024-11-23T07:25:55.454Z",
    "exchangeRates": {
      "showExchangeRateOnInvoice": false
    },
    "filename": "001.pdf",
    "filenameFormat": "[number]",
    "internalNotes": [],
    "isConflictingNumber": false,
    "isPartiallyPaid": false,
    "issueDate": "2024-10-24T06:25:55.454Z",
    "labels": [],
    "lines": [
      {
        "job": {
          "id": "6718a1c90e27164043ceaff6",
          "name": "Demo job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "extraCharge": {
          "type": "percentage",
          "percentage": 0.1,
          "amount": 0
        },
        "quantity": {
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          },
          "value": 1000
        },
        "totalDetails": {
          "extraCharge": {
            "amount": 14,
            "discount": 0,
            "total": 14
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 154
        },
        "group": {
          "isParent": false,
          "childLines": []
        },
        "unitCost": 0.14,
        "discount": 0,
        "lineTotal": 154,
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "id": "6719e8737b67c75f356f97f7"
      }
    ],
    "number": "001",
    "object": "invoice",
    "payments": [],
    "pinned": false,
    "rappenRounding": false,
    "relatedCreditNoteIds": [],
    "sentDate": "2024-10-28T12:48:36.516Z",
    "status": 1,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "value": 0.21
    },
    "total": {
      "discount": {
        "amount": 0,
        "value": 0
      },
      "subtotal": 154,
      "subtotalTaxable": 154,
      "subtotalWithoutTaxes": 154,
      "tax1": {
        "id": "6718a0fd0e27164043ce97ae",
        "name": "VAT",
        "amount": 32.34,
        "value": 0.21
      },
      "tax2": null,
      "total": 186.34
    },
    "type": 1,
    "user": {
      "id": "6718a0b50e27164043ce912e",
      "name": "Cédric Doe"
    },
    "createdAt": "2024-10-24T06:25:55.454Z",
    "updatedAt": "2024-10-28T12:48:39.465Z"
  },
  {...},
  {...}
],
  "pageSize": 20,
  "page": 1,
  "totalPages": 1,
  "totalItems": 2,
  "hasNextPage": false,
  "hasPreviousPage": false
}

POST/v2/invoices

Create an invoice

This endpoint allows you to add a new invoice.

Parameters

  • clientstring Required

    The client id.

  • currencystring Required

    The currency code (ISO, e.g., EUR).

Request

POST
/v2/invoices
curl https://api.lsp.expert/v2/invoices \
  -u {key}: \
  -d client="6718a1350e27164043ce9e80" \
  -d currency="EUR"

Response

{
  "id": "671f895f186d40de4869b857",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T12:53:51.263Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "002.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T12:53:51.263Z",
  "labels": [],
  "lines": [],
  "number": "002",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 0,
    "subtotalTaxable": 0,
    "subtotalWithoutTaxes": 0,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 0,
      "value": 0.21
    },
    "tax2": null,
    "total": 0
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T12:53:51.263Z",
  "updatedAt": "2024-10-28T12:53:51.267Z"
}


POST/v2/invoices/multi

Create an invoice for jobs

This endpoint allows you to add a new invoice and automatically add several lines for jobs.

Parameters

  • groupByProjectManagersboolean

    True if the lines should be grouped by project managers.

  • isPartialboolean

    True if the invoice is partial.

  • jobsarray

    The list of jobs ids.

Request

POST
/v2/invoices/multi
curl https://api.lsp.expert/v2/invoices/multi \
  -u {key}: \
  -d ids=["6718a1c90e27164043ceaff6", "6718a1350e27164043ce9f2f"] 

Response

[
  {
    "id": "671f8c92186d40de4869c002",
    "applyVATReverseCharge": false,
    "archive": false,
    "client": {
      "id": "6718a1350e27164043ce9e80",
      "name": "Microsoft",
      "address": {
        "name": "Microsoft"
      }
    },
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "discount": 0,
    "document": {
      "id": "6718a0b50e27164043ce915a",
      "name": "English"
    },
    "dueDate": "2024-11-27T13:07:30.564Z",
    "exchangeRates": {
      "showExchangeRateOnInvoice": false
    },
    "filename": "001.pdf",
    "filenameFormat": "[number]",
    "internalNotes": [],
    "isConflictingNumber": false,
    "isPartiallyPaid": false,
    "issueDate": "2024-10-28T13:07:30.564Z",
    "labels": [],
    "lines": [
      {
        "job": {
          "id": "6718a1c90e27164043ceaff6",
          "name": "Second job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "additionalInfo": null,
        "unitCost": 0.14,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1000,
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          }
        },
        "lineTotal": 140,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 140
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": false,
          "childLines": []
        },
        "id": "671f8c92186d40de4869c007"
      },
      {
        "job": {
          "id": "6718a1350e27164043ce9f2f",
          "name": "First job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "additionalInfo": null,
        "unitCost": 0.14,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1000,
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          }
        },
        "lineTotal": 140,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 140
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": false,
          "childLines": []
        },
        "id": "671f8c92186d40de4869c00c"
      }
    ],
    "number": "001",
    "object": "invoice",
    "payments": [],
    "pinned": false,
    "rappenRounding": false,
    "relatedCreditNoteIds": [],
    "status": 1,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "value": 0.21
    },
    "total": {
      "discount": {
        "amount": 0,
        "value": 0
      },
      "subtotal": 280,
      "subtotalTaxable": 280,
      "subtotalWithoutTaxes": 280,
      "tax1": {
        "id": "6718a0fd0e27164043ce97ae",
        "name": "VAT",
        "amount": 58.8,
        "value": 0.21
      },
      "tax2": null,
      "total": 338.8
    },
    "type": 1,
    "user": {
      "id": "6718a0b50e27164043ce912e",
      "name": "Cédric Doe"
    },
    "createdAt": "2024-10-28T13:07:30.563Z",
    "updatedAt": "2024-10-28T13:07:30.596Z"
  }
]


POST/v2/invoices/multi-groups

Create an invoice for multi groups

This endpoint allows you to add a new invoice and automatically add several lines for groups.

Parameters

  • groupsarray

    The list of groups ids.

Request

POST
/v2/invoices/multi-groups
curl https://api.lsp.expert/v2/invoices/multi-groups \
  -u {key}: \
  -d ids=["6719f4f853737267e4194122", "671f8d7c186d40de4869c6c3"]

Response

[
  {
    "id": "671f8dbf186d40de4869d64e",
    "applyVATReverseCharge": false,
    "archive": false,
    "client": {
      "id": "6718a1350e27164043ce9e80",
      "name": "Microsoft",
      "address": {
        "name": "Microsoft"
      }
    },
    "currency": {
      "code": "EUR",
      "symbol": "€"
    },
    "discount": 0,
    "document": {
      "id": "6718a0b50e27164043ce915a",
      "name": "English"
    },
    "dueDate": "2024-11-27T13:12:31.066Z",
    "exchangeRates": {
      "showExchangeRateOnInvoice": false
    },
    "filename": "001.pdf",
    "filenameFormat": "[number]",
    "internalNotes": [],
    "isConflictingNumber": false,
    "isPartiallyPaid": false,
    "issueDate": "2024-10-28T13:12:31.066Z",
    "labels": [],
    "lines": [
      {
        "job": {
          "groupId": "671f8d7c186d40de4869c6c3",
          "name": "Second job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "unitCost": 280,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1
        },
        "lineTotal": 280,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "total": 0
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": true,
          "childLines": [
            "671f8dbf186d40de4869d65d",
            "671f8dbf186d40de4869d662"
          ]
        },
        "id": "671f8dbf186d40de4869d65b"
      },
      {
        "job": {
          "id": "6718a1350e27164043ce9f2f",
          "groupId": "671f8d7c186d40de4869c6c3",
          "name": "First job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "additionalInfo": null,
        "unitCost": 0.14,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1000,
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          }
        },
        "lineTotal": 140,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 140
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": false,
          "childLines": [],
          "parentLineId": "671f8dbf186d40de4869d65b"
        },
        "id": "671f8dbf186d40de4869d65d"
      },
      {
        "job": {
          "id": "6718a1c90e27164043ceaff6",
          "groupId": "671f8d7c186d40de4869c6c3",
          "name": "Second job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "additionalInfo": null,
        "unitCost": 0.14,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1000,
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          }
        },
        "lineTotal": 140,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 140
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": false,
          "childLines": [],
          "parentLineId": "671f8dbf186d40de4869d65b"
        },
        "id": "671f8dbf186d40de4869d662"
      },
      {
        "job": {
          "groupId": "6719f4f853737267e4194122",
          "name": "First group",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "unitCost": 280,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1
        },
        "lineTotal": 280,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "total": 0
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": true,
          "childLines": [
            "671f8dbf186d40de4869d671",
            "671f8dbf186d40de4869d676"
          ]
        },
        "id": "671f8dbf186d40de4869d66f"
      },
      {
        "job": {
          "id": "6718a1ea0e27164043ceb62d",
          "groupId": "6719f4f853737267e4194122",
          "name": "Third job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "additionalInfo": null,
        "unitCost": 0.14,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1000,
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          }
        },
        "lineTotal": 140,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 140
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": false,
          "childLines": [],
          "parentLineId": "671f8dbf186d40de4869d66f"
        },
        "id": "671f8dbf186d40de4869d671"
      },
      {
        "job": {
          "id": "6719f4f853737267e419408d",
          "groupId": "6719f4f853737267e4194122",
          "name": "Fourth job",
          "isFixedPrice": false,
          "percentageInvoiced": 1,
          "timeBasedInvoice": false,
          "minimumFeeApplied": false
        },
        "service": {
          "id": "6718a0f90e27164043ce95c0",
          "name": "Translation"
        },
        "additionalInfo": null,
        "unitCost": 0.14,
        "discount": 0,
        "extraCharge": {
          "type": "percentage",
          "percentage": 0,
          "amount": 0
        },
        "quantity": {
          "value": 1000,
          "quantityType": {
            "id": "6718a0f90e27164043ce96a7",
            "name": "Words"
          }
        },
        "lineTotal": 140,
        "totalDetails": {
          "extraCharge": {
            "amount": 0,
            "discount": 0,
            "total": 0
          },
          "subtotal": {
            "amount": 140,
            "discount": 0,
            "total": 140
          },
          "total": 140
        },
        "notIncludeInTaxes": false,
        "matches": [],
        "groupMatches": false,
        "group": {
          "isParent": false,
          "childLines": [],
          "parentLineId": "671f8dbf186d40de4869d66f"
        },
        "id": "671f8dbf186d40de4869d676"
      }
    ],
    "number": "001",
    "object": "invoice",
    "payments": [],
    "pinned": false,
    "rappenRounding": false,
    "relatedCreditNoteIds": [],
    "status": 1,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "value": 0.21
    },
    "total": {
      "discount": {
        "amount": 0,
        "value": 0
      },
      "subtotal": 560,
      "subtotalTaxable": 560,
      "subtotalWithoutTaxes": 560,
      "tax1": {
        "id": "6718a0fd0e27164043ce97ae",
        "name": "VAT",
        "amount": 117.6,
        "value": 0.21
      },
      "tax2": null,
      "total": 677.6
    },
    "type": 1,
    "user": {
      "id": "6718a0b50e27164043ce912e",
      "name": "Cédric Doe"
    },
    "createdAt": "2024-10-28T13:12:31.066Z",
    "updatedAt": "2024-10-28T13:12:31.105Z"
  }
]


GET/v2/invoices/:id

Retrieve an invoice

This endpoint allows you to retrieve an invoice by providing their id.

Request

GET
/v2/invoices/:id
curl https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857 \
  -u {key}:

Response

{
  "id": "671f895f186d40de4869b857",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T12:53:51.263Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "002.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T12:53:51.263Z",
  "labels": [],
  "lines": [],
  "number": "002",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 0,
    "subtotalTaxable": 0,
    "subtotalWithoutTaxes": 0,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 0,
      "value": 0.21
    },
    "tax2": null,
    "total": 0
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T12:53:51.263Z",
  "updatedAt": "2024-10-28T12:53:51.267Z"
}


GET/v2/invoices/generate

Retrieve an invoice as PDF

This endpoint allows you to retrieve a PDF for one or multiple invoices.

Request

GET
/v2/invoices/generate
curl https://api.lsp.expert/v2/invoices/generate/ids=671f905a186d40de4869e273 \
  -u {key}:

GET/v2/invoices//generate-ubl/:id

Retrieve an invoice as UBL

This endpoint allows you to retrieve an UBL file for an invoice.

Request

GET
/v2/invoices/generate-ubl/:id
curl https://api.lsp.expert/v2/invoices/generate-ubl/671f905a186d40de4869e273 \
  -u {key}:

PUT/v2/invoices/:id

Update an invoice

This endpoint allows you to perform an update on an invoice. Any parameters not provided will be left unchanged.

Parameters

  • applyVATReverseChargeboolean

    True if the reverse charge applies.

  • archiveboolean

    True if the entity is archived.

  • clientAddressCitystring,

    The city of the client.

  • clientAddressCountrystring,

    The country of the client.

  • clientAddressLine1string,

    The first line of the client address.

  • clientAddressLine2string,

    The second line of the client address.

  • clientAddressNamestring,

    The name of the client address.

  • clientAddressPostalCodestring,

    The postal code of the client.

  • clientAddressStatestring,

    The state of the client.

  • clientDetailsstring,

    Any details about the client.

  • clientNationalIdentificationNumberstring,

    The national identification number of the client (VAT, SIRET, etc).

  • clientVatNumberstring,

    The VAT number of the client.

  • customStatusstring,null

    The id of a custom status, or null to remove the current one. Setting a custom status also sets the status of the invoice to the status the custom status belongs to, and it takes precedence over status if both are provided. If the invoice ends up in another status (for example because of an automatic rule), the custom status is removed. Custom statuses are only available with a Plus, Premium or Team subscription.

  • discountnumber

    The discount applied on the invoice (percentage).

  • documentstring

    The document id.

  • dueDatestring,

    The due date of the invoice.

  • exchangeRateIssueDatenumber,

    The exchange rate on the issue date.

  • exchangeRatePaymentDatenumber,

    The exchange rate on the payment date.

  • filenameFormatstring

    The filename format.

  • headerstring,

    The header of the invoice.

  • issueDatestring

    The issue date of the invoice.

  • notesstring,

    The notes for the client.

  • numberstring

    The number of the invoice.

  • pinnedboolean

    True if the entity is pinned.

  • rappenRoundingboolean

    True if the rounding is in rappen (CHF currency only).

  • sentDatestring,

    The date the invoice was sent.

  • showExchangeRateOnInvoiceboolean

    True if the exchange rate should be shown on the invoice.

  • statusnumber

    One of the following value: 1 (draft), 2 (sent), 3 (paid), 4 (credited).

  • tax1string,

    The first tax id.

  • tax2string,

    The second tax id.

  • termsstring,

    The terms of the invoice.

Request

PUT
/v2/invoices/:id
curl -X PUT https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857 \
  -u {key}: \
  -d status=2

Response

{
"id": "671f895f186d40de4869b857",
"applyVATReverseCharge": false,
"archive": false,
"client": {
  "id": "6718a1350e27164043ce9e80",
  "name": "Microsoft",
  "address": {
    "name": "Microsoft"
  }
},
"currency": {
  "code": "EUR",
  "symbol": "€"
},
"discount": 0,
"document": {
  "id": "6718a0b50e27164043ce915a",
  "name": "English"
},
"dueDate": "2024-11-27T12:53:51.263Z",
"exchangeRates": {
  "showExchangeRateOnInvoice": false
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"isPartiallyPaid": false,
"issueDate": "2024-10-28T12:53:51.263Z",
"labels": [],
"lines": [],
"number": "002",
"object": "invoice",
"payments": [],
"pinned": false,
"rappenRounding": false,
"relatedCreditNoteIds": [],
"sentDate": "2024-10-28T13:00:05.149Z",
"status": 2,
"tax1": {
  "id": "6718a0fd0e27164043ce97ae",
  "name": "VAT",
  "value": 0.21
},
"total": {
  "discount": {
    "amount": 0,
    "value": 0
  },
  "subtotal": 0,
  "subtotalTaxable": 0,
  "subtotalWithoutTaxes": 0,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "amount": 0,
    "value": 0.21
  },
  "tax2": null,
  "total": 0
},
"type": 1,
"user": {
  "id": "6718a0b50e27164043ce9130",
  "name": "Degallaix Corp."
},
"createdAt": "2024-10-28T12:53:51.263Z",
"updatedAt": "2024-10-28T13:00:05.153Z"
}

PUT/v2/invoices/:id/sync-client

Sync invoice with client info

This endpoint allows you to sync the invoice with the latest client info.

Parameters

Request

PUT
/v2/invoices/:id/sync-client
curl -X PUT https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857/sync-client \
  -u {key}: 

Response

{
"id": "671f895f186d40de4869b857",
"applyVATReverseCharge": false,
"archive": false,
"client": {
  "id": "6718a1350e27164043ce9e80",
  "name": "Microsoft",
  "address": {
    "name": "Microsoft"
  }
},
"currency": {
  "code": "EUR",
  "symbol": "€"
},
"discount": 0,
"document": {
  "id": "6718a0b50e27164043ce915a",
  "name": "English"
},
"dueDate": "2024-11-27T12:53:51.263Z",
"exchangeRates": {
  "showExchangeRateOnInvoice": false
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"isPartiallyPaid": false,
"issueDate": "2024-10-28T12:53:51.263Z",
"labels": [],
"lines": [],
"number": "002",
"object": "invoice",
"payments": [],
"pinned": false,
"rappenRounding": false,
"relatedCreditNoteIds": [],
"sentDate": "2024-10-28T13:00:05.149Z",
"status": 2,
"tax1": {
  "id": "6718a0fd0e27164043ce97ae",
  "name": "VAT",
  "value": 0.21
},
"total": {
  "discount": {
    "amount": 0,
    "value": 0
  },
  "subtotal": 0,
  "subtotalTaxable": 0,
  "subtotalWithoutTaxes": 0,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "amount": 0,
    "value": 0.21
  },
  "tax2": null,
  "total": 0
},
"type": 1,
"user": {
  "id": "6718a0b50e27164043ce9130",
  "name": "Degallaix Corp."
},
"createdAt": "2024-10-28T12:53:51.263Z",
"updatedAt": "2024-10-28T13:00:05.153Z"
}

DELETE/v2/invoices/:id

Delete an invoice

This endpoint allows you to delete an invoice.

Request

DELETE
/v2/invoices/:id
curl -X DELETE https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857 \
  -u {key}:

POST/v2/invoices/email

Send via email

This endpoint allows you to send an invoice via email.

Parameters

  • ccarray

    The list of contact ids to cc (if not provided, use the default cc contacts of the client).

  • contentstring

    The content of the email (if not provided, use the default content of the document configuration for the client).

  • documentSettingsstring

    The document id to use for the email (if not provided, use the default document of the client).

  • isReminderboolean Required

    True if the email is a reminder.

  • subjectstring

    The subject of the email (if not provided, use the default subject of the document configuration for the client).

  • toarray

    The list of contact ids to send the emails to (if not provided, use the default to contacts of the client).

Request

POST
/v2/invoices/:id
curl https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857 \
  -u {key}: 

Response

{
  "id": "671f895f186d40de4869b857",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T12:53:51.263Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "002.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T12:53:51.263Z",
  "labels": [],
  "lines": [],
  "number": "002",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "sentDate": "2024-10-28T13:00:05.149Z",
  "status": 2,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 0,
    "subtotalTaxable": 0,
    "subtotalWithoutTaxes": 0,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 0,
      "value": 0.21
    },
    "tax2": null,
    "total": 0
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T12:53:51.263Z",
  "updatedAt": "2024-10-28T13:00:05.153Z"
}

POST/v2/invoices/:id/lines

Add line

This endpoint allows you to add a line on the invoice.

Parameters

  • namestring Required

    The name of the line.

  • additionalInfostring

    Any additional info.

  • deliveryDatestring

    The delivery date.

  • discountnumber

    The discount applied on the line (percentage).

  • extraChargeAmountnumber

    The extra charge amount.

  • extraChargeDescriptionstring,null

    The extra charge description.

  • extraChargePercentagenumber

    The extra charge percentage.

  • extraChargeTypestring

    One of the following value: amount, percentage.

  • projectManagerstring

    The project manager id.

  • purchaseOrderstring

    The purchase order.

  • quantitynumber Required

    The quantity.

  • quantityTypestring

    The quantity type id.

  • unitCostnumber Required

    The cost per unit.

Request

POST
/v2/invoices/:id/lines
curl https://api.lsp.expert/v2/invoices/671f9a64186d40de4869f3c4/lines \
  -u {key}: \
  -d name="DHL fee" \
  -d quantity=1 \
  -d unitCost=13

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "name": "DHL fee",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "unitCost": 13,
      "discount": 0,
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0,
        "description": null
      },
      "quantity": {
        "value": 1
      },
      "lineTotal": 13,
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 13,
          "discount": 0,
          "total": 13
        },
        "total": 13
      },
      "notIncludeInTaxes": false,
      "matches": [],
      "groupMatches": false,
      "group": {
        "isParent": false,
        "childLines": []
      },
      "id": "671f9a73186d40de4869f4f9"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 13,
    "subtotalTaxable": 13,
    "subtotalWithoutTaxes": 13,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 2.73,
      "value": 0.21
    },
    "tax2": null,
    "total": 15.73
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:06:43.396Z"
}



POST/v2/invoices/:id/lines/job

Add line for a job

This endpoint allows you to add a line on the invoice for a job.

Parameters

  • isPartialboolean

    True if you want to partially invoice the job.

  • jobIdstring Required

    The job id.

Request

POST
/v2/invoices/:id/lines/job
curl https://api.lsp.expert/v2/invoices/671f9a64186d40de4869f3c4/lines/job \
  -u {key}: \
  -d isPartial=false \
  -d jobId="6718a1ea0e27164043ceb62d"

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "6718a1ea0e27164043ceb62d",
        "name": "Third job",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "additionalInfo": null,
      "unitCost": 0.14,
      "discount": 0,
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "value": 1000,
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        }
      },
      "lineTotal": 140,
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 140,
          "discount": 0,
          "total": 140
        },
        "total": 140
      },
      "notIncludeInTaxes": false,
      "matches": [],
      "groupMatches": false,
      "group": {
        "isParent": false,
        "childLines": []
      },
      "id": "671f9b00186d40de4869f6fc"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 140,
    "subtotalTaxable": 140,
    "subtotalWithoutTaxes": 140,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 29.4,
      "value": 0.21
    },
    "tax2": null,
    "total": 169.4
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:09:04.140Z"
}


POST/v2/invoices/:id/lines/group

Add line for a group

This endpoint allows you to add a line on the invoice for a group.

Parameters

  • groupIdstring Required

    The job id.

Request

POST
/v2/invoices/:id/lines/group
curl https://api.lsp.expert/v2/invoices/671f9a64186d40de4869f3c4/lines/group \
  -u {key}: \
  -d groupId="671f9cd7fca5590b104135a6"

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "6718a1ea0e27164043ceb62d",
        "groupId": "671f9cd7fca5590b104135a6",
        "name": "Third job",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "additionalInfo": null,
      "unitCost": 0.14,
      "discount": 0,
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "value": 1000,
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        }
      },
      "lineTotal": 140,
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 140,
          "discount": 0,
          "total": 140
        },
        "total": 140
      },
      "notIncludeInTaxes": false,
      "matches": [],
      "groupMatches": false,
      "group": {
        "isParent": false,
        "childLines": []
      },
      "id": "671f9cf0fca5590b10413b28"
    },
    {
      "job": {
        "id": "6719f4f853737267e419408d",
        "groupId": "671f9cd7fca5590b104135a6",
        "name": "Fourth job",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "additionalInfo": null,
      "unitCost": 0.14,
      "discount": 0,
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "value": 1000,
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        }
      },
      "lineTotal": 140,
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 140,
          "discount": 0,
          "total": 140
        },
        "total": 140
      },
      "notIncludeInTaxes": false,
      "matches": [],
      "groupMatches": false,
      "group": {
        "isParent": false,
        "childLines": []
      },
      "id": "671f9cf0fca5590b10413b35"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 280,
    "subtotalTaxable": 280,
    "subtotalWithoutTaxes": 280,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 58.8,
      "value": 0.21
    },
    "tax2": null,
    "total": 338.8
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:17:20.857Z"
}


PUT/v2/invoices/:id/lines/:line-id

Update an invoice line

This endpoint allows you to perform an update on an invoice line. Any parameters not provided will be left unchanged.

Parameters

  • namestring

    The name of the line.

  • additionalInfostring,null

    Any additional info.

  • deliveryDatestring,null

    The delivery date.

  • discountnumber

    The discount applied on the line (percentage).

  • extraChargeAmountnumber

    The extra charge amount.

  • extraChargeDescriptionstring,null

    The extra charge description.

  • extraChargePercentagenumber

    The extra charge percentage.

  • extraChargeTypestring

    One of the following value: amount, percentage.

  • groupMatchesboolean

    True if the matches are grouped on the line.

  • notIncludeInTaxesboolean

    True if the line should not be included in the taxes.

  • projectManagerstring,null

    The project manager id.

  • purchaseOrderstring,null

    The purchase order.

  • quantitynumber

    The quantity.

  • quantityTypestring,null

    The quantity type id.

  • unitCostnumber

    The cost per unit.

Request

PUT
/v2/invoices/:id/lines/:line-id
curl -X PUT https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857/lines/671f9d82fca5590b1041417f \
  -u {key}: \
  -d name="Third job (edit)"

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "6718a1ea0e27164043ceb62d",
        "groupId": "671f9cd7fca5590b104135a6",
        "name": "Third job (edit)",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        },
        "value": 1000
      },
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 140,
          "discount": 0,
          "total": 140
        },
        "total": 140
      },
      "group": {
        "isParent": false,
        "childLines": []
      },
      "unitCost": 0.14,
      "discount": 0,
      "lineTotal": 140,
      "notIncludeInTaxes": false,
      "matches": [],
      "groupMatches": false,
      "id": "671f9d82fca5590b1041417f"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 140,
    "subtotalTaxable": 140,
    "subtotalWithoutTaxes": 140,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 29.4,
      "value": 0.21
    },
    "tax2": null,
    "total": 169.4
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:22:25.092Z"
}

PUT/v2/invoices/:id/lines/:line-id/matches/:match-id

Update an invoice line match

This endpoint allows you to perform an update on a match. Any parameters not provided will be left unchanged.

Parameters

  • quantitynumber

    The quantity.

  • unitCostnumber

    The cost per unit.

Request

PUT
/v2/invoices/:id/lines/:line-id/:match-id
curl -X PUT https://api.lsp.expert/v2/invoices/671f9ed7fca5590b10415012/lines/671f9ed7fca5590b10415012/matches/671f9ed7fca5590b10415013 \
  -u {key}: \
  -d quantity=1450

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "671f9ec7fca5590b10414931",
        "name": "Brochure 2024",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        },
        "value": 1950
      },
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 273,
          "discount": 0,
          "total": 273
        },
        "total": 273
      },
      "group": {
        "isParent": false,
        "childLines": []
      },
      "unitCost": 0.14,
      "discount": 0,
      "lineTotal": 273,
      "notIncludeInTaxes": false,
      "matches": [
        {
          "match": {
            "id": "671f9eaafca5590b1041459f",
            "name": "0%"
          },
          "unitCost": 0.14,
          "quantity": 1450,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 203,
          "id": "671f9ed7fca5590b10415013"
        },
        {
          "match": {
            "id": "671f9ea7fca5590b10414546",
            "name": "100%"
          },
          "unitCost": 0.14,
          "quantity": 200,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 28,
          "id": "671f9ed7fca5590b10415015"
        },
        {
          "match": {
            "id": "671f9eaefca5590b104145fa",
            "name": "Fuzzies"
          },
          "unitCost": 0.14,
          "quantity": 300,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 42,
          "id": "671f9ed7fca5590b10415017"
        }
      ],
      "groupMatches": false,
      "id": "671f9ed7fca5590b10415012"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 273,
    "subtotalTaxable": 273,
    "subtotalWithoutTaxes": 273,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 57.33,
      "value": 0.21
    },
    "tax2": null,
    "total": 330.33
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:25:39.869Z"
}

PUT/v2/invoices/:id/lines/:line-id/sync

Sync an invoice line with the job

This endpoint allows you to sync a line with the related job (quantity, unit cost, etc.).

Parameters

Request

PUT
/v2/invoices/:id/lines/:line-id/sync
curl -X PUT https://api.lsp.expert/v2/invoices/671f9ed7fca5590b10415012/lines/671f9ec7fca5590b10414931/sync \
  -u {key}: 

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "671f9ec7fca5590b10414931",
        "name": "Brochure 2024",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        },
        "value": 1950
      },
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 273,
          "discount": 0,
          "total": 273
        },
        "total": 273
      },
      "group": {
        "isParent": false,
        "childLines": []
      },
      "unitCost": 0.14,
      "discount": 0,
      "lineTotal": 273,
      "notIncludeInTaxes": false,
      "matches": [
        {
          "match": {
            "id": "671f9eaafca5590b1041459f",
            "name": "0%"
          },
          "unitCost": 0.14,
          "quantity": 1450,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 203,
          "id": "671f9ed7fca5590b10415013"
        },
        {
          "match": {
            "id": "671f9ea7fca5590b10414546",
            "name": "100%"
          },
          "unitCost": 0.14,
          "quantity": 200,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 28,
          "id": "671f9ed7fca5590b10415015"
        },
        {
          "match": {
            "id": "671f9eaefca5590b104145fa",
            "name": "Fuzzies"
          },
          "unitCost": 0.14,
          "quantity": 300,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 42,
          "id": "671f9ed7fca5590b10415017"
        }
      ],
      "groupMatches": false,
      "id": "671f9ed7fca5590b10415012"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 273,
    "subtotalTaxable": 273,
    "subtotalWithoutTaxes": 273,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 57.33,
      "value": 0.21
    },
    "tax2": null,
    "total": 330.33
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:25:39.869Z"
}

PUT/v2/invoices/:id/lines/:line-id/move/:new-position

Move an invoice line

This endpoint allows you to move a line to a new position.

Parameters

Request

PUT
/v2/invoices/:id/lines/:line-id/move/:new-position
curl -X PUT https://api.lsp.expert/v2/invoices/671f9ed7fca5590b10415012/lines/671f9ec7fca5590b10414931/move/1 \
  -u {key}: 

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [
    {
      "job": {
        "id": "671f9ec7fca5590b10414931",
        "name": "Brochure 2024",
        "isFixedPrice": false,
        "percentageInvoiced": 1,
        "timeBasedInvoice": false,
        "minimumFeeApplied": false
      },
      "service": {
        "id": "6718a0f90e27164043ce95c0",
        "name": "Translation"
      },
      "extraCharge": {
        "type": "percentage",
        "percentage": 0,
        "amount": 0
      },
      "quantity": {
        "quantityType": {
          "id": "6718a0f90e27164043ce96a7",
          "name": "Words"
        },
        "value": 1950
      },
      "totalDetails": {
        "extraCharge": {
          "amount": 0,
          "discount": 0,
          "total": 0
        },
        "subtotal": {
          "amount": 273,
          "discount": 0,
          "total": 273
        },
        "total": 273
      },
      "group": {
        "isParent": false,
        "childLines": []
      },
      "unitCost": 0.14,
      "discount": 0,
      "lineTotal": 273,
      "notIncludeInTaxes": false,
      "matches": [
        {
          "match": {
            "id": "671f9eaafca5590b1041459f",
            "name": "0%"
          },
          "unitCost": 0.14,
          "quantity": 1450,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 203,
          "id": "671f9ed7fca5590b10415013"
        },
        {
          "match": {
            "id": "671f9ea7fca5590b10414546",
            "name": "100%"
          },
          "unitCost": 0.14,
          "quantity": 200,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 28,
          "id": "671f9ed7fca5590b10415015"
        },
        {
          "match": {
            "id": "671f9eaefca5590b104145fa",
            "name": "Fuzzies"
          },
          "unitCost": 0.14,
          "quantity": 300,
          "discount": 0,
          "extraCharge": 0,
          "lineTotal": 42,
          "id": "671f9ed7fca5590b10415017"
        }
      ],
      "groupMatches": false,
      "id": "671f9ed7fca5590b10415012"
    }
  ],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 273,
    "subtotalTaxable": 273,
    "subtotalWithoutTaxes": 273,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 57.33,
      "value": 0.21
    },
    "tax2": null,
    "total": 330.33
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T14:25:39.869Z"
}

DELETE/v2/invoices/:id/lines/:line-id

Delete an invoice line

This endpoint allows you to delete an invoice line.

Request

DELETE
/v2/invoices/:id/lines/:line-id
curl -X DELETE https://api.lsp.expert/v2/invoices/671f895f186d40de4869b857/lines/671f9ec7fca5590b10414931 \
  -u {key}:

Response

{
  "id": "671f9a64186d40de4869f3c4",
  "applyVATReverseCharge": false,
  "archive": false,
  "client": {
    "id": "6718a1350e27164043ce9e80",
    "name": "Microsoft",
    "address": {
      "name": "Microsoft"
    }
  },
  "currency": {
    "code": "EUR",
    "symbol": "€"
  },
  "discount": 0,
  "document": {
    "id": "6718a0b50e27164043ce915a",
    "name": "English"
  },
  "dueDate": "2024-11-27T14:06:28.759Z",
  "exchangeRates": {
    "showExchangeRateOnInvoice": false
  },
  "filename": "003.pdf",
  "filenameFormat": "[number]",
  "internalNotes": [],
  "isConflictingNumber": false,
  "isPartiallyPaid": false,
  "issueDate": "2024-10-28T14:06:28.759Z",
  "labels": [],
  "lines": [],
  "number": "003",
  "object": "invoice",
  "payments": [],
  "pinned": false,
  "rappenRounding": false,
  "relatedCreditNoteIds": [],
  "status": 1,
  "tax1": {
    "id": "6718a0fd0e27164043ce97ae",
    "name": "VAT",
    "value": 0.21
  },
  "total": {
    "discount": {
      "amount": 0,
      "value": 0
    },
    "subtotal": 0,
    "subtotalTaxable": 0,
    "subtotalWithoutTaxes": 0,
    "tax1": {
      "id": "6718a0fd0e27164043ce97ae",
      "name": "VAT",
      "amount": 0,
      "value": 0.21
    },
    "tax2": null,
    "total": 0
  },
  "type": 1,
  "user": {
    "id": "6718a0b50e27164043ce9130",
    "name": "Degallaix Corp."
  },
  "createdAt": "2024-10-28T14:06:28.759Z",
  "updatedAt": "2024-10-28T15:41:09.292Z"
}