Purchase orders
Purchase orders represent a set of jobs that are to be completed by a supplier.
The Purchase order object
Properties
idstring
Unique identifier for the object.
applyVATReverseChargeboolean
True if the reverse charge applies.
archiveboolean
True if the entity is archived.
currencyobject
The currency.documentobject
The document configuration.filenameFormatstring
The filename format.
internalNotesarray
The notesisConflictingNumberboolean
True if the number is conflicting.
issueDatedate
The issue date.
labelsarray
The labels.linesarray
The lines.notesstring
The notes linked to the entity.
numberstring
The purchase order number.
paymentTermsnumber
The payment terms.
paymentTermsEndOfMonthboolean
True if the payment terms end of month.
pinnedboolean
True if the entity is pinned.
rappenRoundingboolean
True if the rounding is in rappen (CHF currency only).
sentDatedate
The date the entity was sent.
sentDateStatusobject
sentDateStatusstatusnumber
The status of the sent date. Valid values are:
delivered
(the email was delivered),open
(the email was opened),bounce
(the email bounced),dropped
(the email was dropped),processed
(the email was processed).supplierobject
The suppliertax1object
he first tax.tax2object
The second taxtermsstring
The terms and conditions.
totalobject
The total.userobject
The user that created the purchase order.createdAtdate
The date and time the entity was created.
updatedAtdate
The date and time the entity was last updated.
purchase order object
{
"id": "673afe8023b8c71a21e16b95",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T08:44:48.349Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1350e27164043ce9f2f",
"name": "First job",
"isFixedPrice": false,
"outsourcing": "6718a1a20e27164043cea544",
"clientId": "6718a1350e27164043ce9e80"
},
"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": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"dueDate": "2024-10-24T06:00:00.000Z",
"unitCost": 0.09,
"discount": 0,
"lineTotal": 90,
"notIncludeInTaxes": false,
"matches": [],
"id": "673afe8023b8c71a21e16bfc"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"status": 1,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T08:44:48.349Z",
"updatedAt": "2024-11-18T08:44:48.400Z"
}
List all purchase orders
This endpoint allows you to retrieve all the purchase orders.
Request
curl -G https://api.lsp.expert/v2/purchase-orders \
-u {key}:
Response
{
"items": [{
"id": "673afe8023b8c71a21e16b95",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T08:44:48.349Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1350e27164043ce9f2f",
"name": "First job",
"isFixedPrice": false,
"outsourcing": "6718a1a20e27164043cea544",
"clientId": "6718a1350e27164043ce9e80"
},
"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": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"dueDate": "2024-10-24T06:00:00.000Z",
"unitCost": 0.09,
"discount": 0,
"lineTotal": 90,
"notIncludeInTaxes": false,
"matches": [],
"id": "673afe8023b8c71a21e16bfc"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"status": 1,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T08:44:48.349Z",
"updatedAt": "2024-11-18T08:44:48.400Z"
},
{...},
{...}
],
"pageSize": 20,
"page": 1,
"totalPages": 1,
"totalItems": 2,
"hasNextPage": false,
"hasPreviousPage": false
}
Create a purchase order
This endpoint allows you to add a new purchase order.
Parameters
currencystring Required
The currency code (ISO, e.g., EUR).
supplierstring Required
The supplier id.
Request
curl https://api.lsp.expert/v2/purchase-orders \
-u {key}: \
-d supplier="6718a1a20e27164043cea4e8" \
-d currency="EUR"
Response
{
"id": "673b026923b8c71a21e16e7b",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "003.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:01:29.569Z",
"labels": [],
"lines": [],
"number": "003",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"status": 1,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 0,
"subtotalTaxable": 0,
"subtotalWithoutTaxes": 0,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 0,
"value": 0.21
},
"tax2": null,
"total": 0
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:01:29.569Z",
"updatedAt": "2024-11-18T09:01:29.574Z"
}
Create a purchase order for jobs
This endpoint allows you to add a new purchase order and automatically add several lines for jobs.
Parameters
jobsarray
The list of jobs ids.
Request
curl https://api.lsp.expert/v2/purchase-orders/multi \
-u {key}: \
-d ids=["671f9ec7fca5590b10414931", "6718a1ea0e27164043ceb62d"]
Response
[
{
"id": "673b032123b8c71a21e1796e",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "001.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:04:33.617Z",
"labels": [],
"lines": [
{
"job": {
"id": "671f9ec7fca5590b10414931",
"name": "Brochure 2024",
"isFixedPrice": false,
"outsourcing": "6736fc03503cd0c91070bc5f",
"clientId": "6718a1350e27164043ce9e80"
},
"dueDate": "2024-10-28T15:00:00.000Z",
"startDate": null,
"service": {
"id": "6718a0f90e27164043ce95c0",
"name": "Translation"
},
"languagePair": {
"id": "672c70b62a89c7102545773f",
"source": {
"code": "de",
"name": "German"
},
"target": {
"code": "de",
"name": "German"
},
"bidirectional": true
},
"unitCost": 0.09,
"discount": 0,
"extraCharge": {
"type": "percentage",
"percentage": 0,
"amount": 0
},
"quantity": {
"value": 2000,
"quantityType": {
"id": "6718a0f90e27164043ce96a7",
"name": "Words"
}
},
"lineTotal": 180,
"totalDetails": {
"extraCharge": {
"amount": 0,
"discount": 0,
"total": 0
},
"subtotal": {
"amount": 180,
"discount": 0,
"total": 180
},
"total": 180
},
"notIncludeInTaxes": false,
"matches": [
{
"match": {
"id": "671f9eaafca5590b1041459f",
"name": "0%"
},
"unitCost": 0.09,
"quantity": 1500,
"lineTotal": 135,
"id": "673b032123b8c71a21e17972"
},
{
"match": {
"id": "671f9ea7fca5590b10414546",
"name": "100%"
},
"unitCost": 0.09,
"quantity": 200,
"lineTotal": 18,
"id": "673b032123b8c71a21e17974"
},
{
"match": {
"id": "671f9eaefca5590b104145fa",
"name": "Fuzzies"
},
"unitCost": 0.09,
"quantity": 300,
"lineTotal": 27,
"id": "673b032123b8c71a21e17976"
}
],
"id": "673b032123b8c71a21e17971"
},
{
"job": {
"id": "6718a1ea0e27164043ceb62d",
"name": "Third job",
"isFixedPrice": false,
"outsourcing": "6718a1ea0e27164043ceb6c5",
"clientId": "6718a1350e27164043ce9e80"
},
"dueDate": "2024-10-25T08:00:00.000Z",
"service": {
"id": "6718a0f90e27164043ce95c0",
"name": "Translation"
},
"unitCost": 0.09,
"discount": 0,
"extraCharge": {
"type": "percentage",
"percentage": 0,
"amount": 0
},
"quantity": {
"value": 1000,
"quantityType": {
"id": "6718a0f90e27164043ce96a7",
"name": "Words"
}
},
"lineTotal": 90,
"totalDetails": {
"extraCharge": {
"amount": 0,
"discount": 0,
"total": 0
},
"subtotal": {
"amount": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"notIncludeInTaxes": false,
"matches": [],
"id": "673b032123b8c71a21e1797d"
}
],
"number": "001",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"status": 1,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 270,
"subtotalTaxable": 270,
"subtotalWithoutTaxes": 270,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 56.7,
"value": 0.21
},
"tax2": null,
"total": 326.7
},
"user": {
"id": "6718a0b50e27164043ce912e",
"name": "Cédric Doe"
},
"createdAt": "2024-11-18T09:04:33.617Z",
"updatedAt": "2024-11-18T09:04:33.631Z"
}
]
Retrieve a purchase order
This endpoint allows you to retrieve a purchase order by providing their id.
Request
curl https://api.lsp.expert/v2/purchase-orders/673afe8023b8c71a21e16b95 \
-u {key}:
Response
{
"id": "673afe8023b8c71a21e16b95",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T08:44:48.349Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1350e27164043ce9f2f",
"name": "First job",
"isFixedPrice": false,
"outsourcing": "6718a1a20e27164043cea544",
"clientId": "6718a1350e27164043ce9e80"
},
"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": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"dueDate": "2024-10-24T06:00:00.000Z",
"unitCost": 0.09,
"discount": 0,
"lineTotal": 90,
"notIncludeInTaxes": false,
"matches": [],
"id": "673afe8023b8c71a21e16bfc"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"status": 1,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T08:44:48.349Z",
"updatedAt": "2024-11-18T08:44:48.400Z"
}
Retrieve a purchase order as PDF
This endpoint allows you to retrieve a PDF for one or multiple purchase orders.
Request
curl https://api.lsp.expert/v2/purchase-orders/generate/ids=673afe8023b8c71a21e16b95 \
-u {key}:
Update a purchase order
This endpoint allows you to perform an update on a purchase order. Any parameters not provided will be left unchanged.
Parameters
applyVATReverseChargeboolean
True if the reverse charge applies.
documentstring
The document id.
filenameFormatstring
The filename format.
issueDatestring
The issue date.
notesstring,
The notes linked to the entity.
numberstring
The number of the entity.
pinnedboolean
True if the entity is pinned.
rappenRoundingboolean
True if the rounding is in rappen.
sentDatestring,
The sent date.
statusnumber
One of the following value:
1
,2
,3
.supplierAddressCitystring,
The city of the supplier address.
supplierAddressCountrystring,
The country of the supplier address.
supplierAddressLine1string,
The first line of the supplier address.
supplierAddressLine2string,
The second line of the supplier address.
supplierAddressNamestring,
The name of the supplier address.
supplierAddressPostalCodestring,
The postal code of the supplier address.
supplierAddressStatestring,
The state of the supplier address.
supplierDetailsstring,
Any details about the supplier.
supplierNationalIdentificationNumberstring,
The national identification number of the supplier.
supplierVatNumberstring,
The VAT number of the supplier.
tax1string,
The first tax id.
tax2string,
The second tax id.
termsstring,
The terms of the entity.
Request
curl -X PUT https://api.lsp.expert/v2/purchase-orders/673afe8023b8c71a21e16b95 \
-u {key}: \
-d status=2
Response
{
"id": "673afe8023b8c71a21e16b95",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1350e27164043ce9f2f",
"name": "First job",
"isFixedPrice": false,
"outsourcing": "6718a1a20e27164043cea544",
"clientId": "6718a1350e27164043ce9e80"
},
"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": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"dueDate": "2024-10-24T06:00:00.000Z",
"unitCost": 0.09,
"discount": 0,
"lineTotal": 90,
"notIncludeInTaxes": false,
"matches": [],
"id": "673b04d923b8c71a21e184e2"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:11:56.374Z"
}
Sync purchase order with client info
This endpoint allows you to sync the purchase order with the latest client info.
Parameters
Request
curl -X PUT https://api.lsp.expert/v2/purchase-orders/673afe8023b8c71a21e16b95/sync-client \
-u {key}:
Response
{
"id": "673afe8023b8c71a21e16b95",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1350e27164043ce9f2f",
"name": "First job",
"isFixedPrice": false,
"outsourcing": "6718a1a20e27164043cea544",
"clientId": "6718a1350e27164043ce9e80"
},
"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": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"dueDate": "2024-10-24T06:00:00.000Z",
"unitCost": 0.09,
"discount": 0,
"lineTotal": 90,
"notIncludeInTaxes": false,
"matches": [],
"id": "673b04d923b8c71a21e184e2"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:11:56.374Z"
}
Delete a purchase order
This endpoint allows you to delete a purchase order.
Request
curl -X DELETE https://api.lsp.expert/v2/purchase-orders/673afe8023b8c71a21e16b95 \
-u {key}:
Send via email
This endpoint allows you to send a purchase order via email.
Parameters
ccContactsarray
The list of contact ids to cc (if not provided, use the default cc contacts of the supplier).
contactsarray
The list of contact ids to send the emails to (if not provided, use the default to contacts of the supplier).
contentstring
The content of the email (if not provided, use the default content of the document configuration for the supplier).
documentSettingsstring
The document id to use for the email (if not provided, use the default document of the supplier).
subjectstring
The subject of the email (if not provided, use the default subject of the document configuration for the supplier).
tostring
The email to send the email to (if not provided, use the default email of the supplier).
Request
curl https://api.lsp.expert/v2/purchase-orders/673afe8023b8c71a21e16b95 \
-u {key}:
Response
{
"id": "673afe8023b8c71a21e16b95",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1350e27164043ce9f2f",
"name": "First job",
"isFixedPrice": false,
"outsourcing": "6718a1a20e27164043cea544",
"clientId": "6718a1350e27164043ce9e80"
},
"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": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"dueDate": "2024-10-24T06:00:00.000Z",
"unitCost": 0.09,
"discount": 0,
"lineTotal": 90,
"notIncludeInTaxes": false,
"matches": [],
"id": "673b04d923b8c71a21e184e2"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:11:56.374Z"
}
Add line for a job
This endpoint allows you to add a line on the purchase order for a job.
Parameters
jobIdstring Required
The job id.
outsourcingIdstring Required
The outsourcing id.
Request
curl https://api.lsp.expert/v2/purchase-orders/673b04d923b8c71a21e1847b/lines/job \
-u {key}: \
-d jobId="6718a1ea0e27164043ceb62d"
-d outsourcingId="6718a1ea0e27164043ceb6c5"
Response
{
"id": "673b04d923b8c71a21e1847b",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1ea0e27164043ceb62d",
"name": "Third job",
"isFixedPrice": false,
"outsourcing": "6718a1ea0e27164043ceb6c5",
"clientId": "6718a1350e27164043ce9e80"
},
"dueDate": "2024-10-25T08:00:00.000Z",
"service": {
"id": "6718a0f90e27164043ce95c0",
"name": "Translation"
},
"unitCost": 0.09,
"discount": 0,
"extraCharge": {
"type": "percentage",
"percentage": 0,
"amount": 0
},
"quantity": {
"value": 1000,
"quantityType": {
"id": "6718a0f90e27164043ce96a7",
"name": "Words"
}
},
"lineTotal": 90,
"totalDetails": {
"extraCharge": {
"amount": 0,
"discount": 0,
"total": 0
},
"subtotal": {
"amount": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"notIncludeInTaxes": false,
"matches": [],
"id": "673b065923b8c71a21e18708"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:18:17.418Z"
}
Sync a purchase order line with the job
This endpoint allows you to sync a line with the related job (quantity, unit cost, etc.).
Parameters
Request
curl -X PUT https://api.lsp.expert/v2/purchase-orders/673b04d923b8c71a21e1847b/lines/6718a1ea0e27164043ceb62d/sync \
-u {key}:
Response
{
"id": "673b04d923b8c71a21e1847b",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1ea0e27164043ceb62d",
"name": "Third job",
"isFixedPrice": false,
"outsourcing": "6718a1ea0e27164043ceb6c5",
"clientId": "6718a1350e27164043ce9e80"
},
"dueDate": "2024-10-25T08:00:00.000Z",
"service": {
"id": "6718a0f90e27164043ce95c0",
"name": "Translation"
},
"unitCost": 0.09,
"discount": 0,
"extraCharge": {
"type": "percentage",
"percentage": 0,
"amount": 0
},
"quantity": {
"value": 1000,
"quantityType": {
"id": "6718a0f90e27164043ce96a7",
"name": "Words"
}
},
"lineTotal": 90,
"totalDetails": {
"extraCharge": {
"amount": 0,
"discount": 0,
"total": 0
},
"subtotal": {
"amount": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"notIncludeInTaxes": false,
"matches": [],
"id": "673b065923b8c71a21e18708"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:18:17.418Z"
}
Move a purchase order line
This endpoint allows you to move a line to a new position.
Parameters
Request
curl -X PUT https://api.lsp.expert/v2/purchase-orders/673b04d923b8c71a21e1847b/lines/673b065923b8c71a21e18708/move/1 \
-u {key}:
Response
{
"id": "673b04d923b8c71a21e1847b",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [
{
"job": {
"id": "6718a1ea0e27164043ceb62d",
"name": "Third job",
"isFixedPrice": false,
"outsourcing": "6718a1ea0e27164043ceb6c5",
"clientId": "6718a1350e27164043ce9e80"
},
"dueDate": "2024-10-25T08:00:00.000Z",
"service": {
"id": "6718a0f90e27164043ce95c0",
"name": "Translation"
},
"unitCost": 0.09,
"discount": 0,
"extraCharge": {
"type": "percentage",
"percentage": 0,
"amount": 0
},
"quantity": {
"value": 1000,
"quantityType": {
"id": "6718a0f90e27164043ce96a7",
"name": "Words"
}
},
"lineTotal": 90,
"totalDetails": {
"extraCharge": {
"amount": 0,
"discount": 0,
"total": 0
},
"subtotal": {
"amount": 90,
"discount": 0,
"total": 90
},
"total": 90
},
"notIncludeInTaxes": false,
"matches": [],
"id": "673b065923b8c71a21e18708"
}
],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 90,
"subtotalTaxable": 90,
"subtotalWithoutTaxes": 90,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 18.9,
"value": 0.21
},
"tax2": null,
"total": 108.9
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:18:17.418Z"
}
Delete a purchase order line
This endpoint allows you to delete a purchase order line.
Request
curl -X DELETE https://api.lsp.expert/v2/purchase-orders/673b04d923b8c71a21e1847b/lines/673b065923b8c71a21e18708 \
-u {key}:
Response
{
"id": "673b04d923b8c71a21e1847b",
"applyVATReverseCharge": false,
"archive": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6718a0b50e27164043ce915a",
"name": "English"
},
"filename": "002.pdf",
"filenameFormat": "[number]",
"internalNotes": [],
"isConflictingNumber": false,
"issueDate": "2024-11-18T09:11:53.150Z",
"labels": [],
"lines": [],
"number": "002",
"object": "purchaseOrder",
"paymentTerms": 30,
"paymentTermsEndOfMonth": false,
"pinned": false,
"rappenRounding": false,
"sentDate": "2024-11-18T09:11:56.368Z",
"status": 2,
"supplier": {
"id": "6718a1a20e27164043cea4e8",
"name": "Caroline Dupont",
"address": {
"name": "Caroline Dupont"
}
},
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"value": 0.21
},
"total": {
"subtotal": 0,
"subtotalTaxable": 0,
"subtotalWithoutTaxes": 0,
"tax1": {
"id": "6718a0fd0e27164043ce97ae",
"name": "VAT",
"amount": 0,
"value": 0.21
},
"tax2": null,
"total": 0
},
"user": {
"id": "6718a0b50e27164043ce9130",
"name": "Degallaix Corp."
},
"createdAt": "2024-11-18T09:11:53.150Z",
"updatedAt": "2024-11-18T09:22:09.322Z"
}