Projects API
General:
Basics:
Base-URL: https://capi.lagerkoll.com/v1/projects/
Parameters in the url should all be encoded and all data sent should be UTF-8
MAX number of requests per minute is set to 200.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.
Headers:
There are 2 ways to be authenticated when using this API. in both ways you add headers to the request.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
store: <<STORE>> user_id: <<USER_ID>> user_token: <<USER_TOKEN>> api_key: <<API_KEY>> Accept: application/json Content-Type: application/json
Errors:
Code | Description |
---|---|
900001 | Credentials don't match |
900101 | Common error |
900429 | Too many requests |
906001 | Error when getting project |
906002 | Error when getting customer |
906003 | Error when getting user |
906004 | Error when getting article |
906005 | Error when getting invoice draft |
906011 | Error when creating a project |
906012 | Error when creating a project article |
906013 | Error when creating invoice draft from articles |
906014 | Error when creating invoice from invoice drafts |
906021 | Error when updating a project |
906022 | Error when updating a project article |
906023 | Error when updating an invoice draft |
906031 | To large amount for the artcile |
906032 | Project still has articles with amount in them |
{ "errorCode" : 900101, "errorMessage" : "Something went wrong on the server", "errorField" : null, "errorData" : null }
Projects API:
Export
Create export
POSTUrl: /export
Headers:
Accept: application/json or application/xml
Create export file for articles in open projects
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
save_document | If true, the document will be saved in the feature extension. If false, a mail will be sent to all admins of the store | false |
Body:
Successfull response:
Projects
Get projects
GETUrl:
Headers:
Accept: application/json or application/xml
Get a list of projects
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
state | -1 | 0,1 | |
from | 0 | ||
to | 0 | ||
page | 0 | ||
limit | 50 | ||
query | |||
cost | false | ||
sort_column | start_date | start_date,end_date | |
order | desc | asc,desc |
Body:
Successfull response:
{ "pages": 8865, "projects": [{ "createdByName": "createdByName", "cost": 4274.316419056895, "created": 3086, "description": "description", "customerName": "customerName", "stockValue": 1777.7583277808717, "name": "name", "customerId": 8147, "state": "0", "projectId": 808, "responsibleUserId": 8920, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 909.8409398058304, "batchSnBestBefore": 1275, "accountName": "accountName", "articleId": "articleId", "priceListId": 5647, "purchasePrice": 7711.943982755612, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9531, "checkoutDate": 9177, "price": 4465.738293150123, "comment": "comment", "id": 7714, "projectId": 5321, "checkoutAmount": 9420.6058461953, "events": [{ "date": 1751420620788, "amount": 3042.268998652623, "type": "type" }], "checkinConsumeDate": 1751420620788, "checkinAmount": 3005.511691662579, "consumedAmount": 1568.9771900373285 }], "createdById": 9565, "responsibleUserName": "responsibleUserName" }], "pageSize": 9855, "page": 9491, "projectsCount": 7643 }
Get changed projects
GETUrl: /events
Headers:
Accept: application/json or application/xml
Get a list of open projects where articles have been checked out, checked in, consumed or invoiced between a start date and end date
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
start_date | Start date of when events can occur. Format is yyyy-MM-dd and defaults to previous month | ||
end_date | End date of when events can occur. Format is yyyy-MM-dd and defaults to end of start date's month | ||
page | 0 | ||
limit | 50 | ||
sort_column | created | name, customer, created_by, created | |
order | desc | asc,desc |
Body:
Successfull response:
{ "pages": 6861, "projects": [{ "createdByName": "createdByName", "cost": 1240.3338766523352, "created": 2655, "description": "description", "customerName": "customerName", "stockValue": 3243.0356683151986, "name": "name", "customerId": 1475, "state": "0", "projectId": 9203, "responsibleUserId": 8517, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1667.2937835615264, "batchSnBestBefore": 5041, "accountName": "accountName", "articleId": "articleId", "priceListId": 5521, "purchasePrice": 9618.659411343295, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3850, "checkoutDate": 9071, "price": 4803.000403868145, "comment": "comment", "id": 2762, "projectId": 4146, "checkoutAmount": 972.2366005088245, "events": [{ "date": 1751420620789, "amount": 775.3093617444429, "type": "type" }], "checkinConsumeDate": 1751420620789, "checkinAmount": 3991.3856003169235, "consumedAmount": 7020.224422242752 }], "createdById": 5051, "responsibleUserName": "responsibleUserName" }], "pageSize": 4039, "page": 6179, "projectsCount": 2091 }
Get project articles
GETUrl: /{project_id}/articles
Headers:
Accept: application/json or application/xml
Get a list of project articles
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
query | |||
state | 0-all articles, 1-only checked out articles with available value, 2-checked out and rental articles with available value | 0 | 0,1,2 |
page | 0 | ||
limit | 50 | ||
sort_column | checkout_date | article_id, article_name, user, checkout_date | |
sort_order | desc | asc,desc |
Body:
Successfull response:
{ "pages": 8056, "pageSize": 8034, "page": 1142, "projectsCount": 8165, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6907.218401285341, "batchSnBestBefore": 4134, "accountName": "accountName", "articleId": "articleId", "priceListId": 9756, "purchasePrice": 7266.15045396933, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 9444, "checkoutDate": 743, "price": 464.0888685146416, "comment": "comment", "id": 7660, "projectId": 9291, "checkoutAmount": 8692.498047408653, "events": [{ "date": 1751420620790, "amount": 4184.745298652245, "type": "type" }], "checkinConsumeDate": 1751420620790, "checkinAmount": 4588.690898522637, "consumedAmount": 4030.6219408614884 }] }
Get cost for project
GETUrl: /{project_id}/cost
Headers:
Accept: application/json or application/xml
Get total cost for a project
Body:
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 36.39752204648295, "articleName": "articleName", "pricelistId": 6101, "endDate": 1751420620790, "rentalAmount": 3934.2738046010263, "created": 1751420620790, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 2624, "price": 4725.3753674172485, "isProcessed": true, "dataArticleId": 1891, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2774, "startDate": 1751420620790, "createdById": 732 }], "pages": 1727, "pageSize": 5677, "draftsCount": 7611, "page": 5040 }
Get invoice drafts
GETUrl: /{project_id}/articles/invoice
Headers:
Accept: application/json or application/xml
Get a list of invoice drafts for a project
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
state | 0-invoice drafts that are not invoiced or in processed, 1-invoice drafts that are in process but not yet invoiced 2-invoice drafts which are invoiced and processed | 0 | 0, 1, 2 |
page | 0 | ||
limit | 50 | ||
sort_column | created | article_id, article_name, user, created | |
sort_order | desc | asc,desc |
Body:
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 2826.6284047783906, "articleName": "articleName", "pricelistId": 6521, "endDate": 1751420620790, "rentalAmount": 5611.89250780304, "created": 1751420620790, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 9658, "price": 532.0041194781311, "isProcessed": false, "dataArticleId": 5620, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 232, "startDate": 1751420620790, "createdById": 4547 }], "pages": 1216, "pageSize": 4725, "draftsCount": 8037, "page": 6998 }
Get project for id
GETUrl: /{project_id}
Headers:
Accept: application/json or application/xml
Get project based on id
Body:
Successfull response:
{ "createdByName": "createdByName", "cost": 9218.769199644936, "created": 612, "description": "description", "customerName": "customerName", "stockValue": 642.3875718667871, "name": "name", "customerId": 6141, "state": "0", "projectId": 7505, "responsibleUserId": 8386, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3900.785092324327, "batchSnBestBefore": 2926, "accountName": "accountName", "articleId": "articleId", "priceListId": 7636, "purchasePrice": 572.5155466350618, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2893, "checkoutDate": 3938, "price": 9713.538871782564, "comment": "comment", "id": 1998, "projectId": 6690, "checkoutAmount": 3975.1864207556087, "events": [{ "date": 1751420620791, "amount": 8103.668537238719, "type": "type" }], "checkinConsumeDate": 1751420620791, "checkinAmount": 1152.6931536986474, "consumedAmount": 8662.824253344994 }], "createdById": 4997, "responsibleUserName": "responsibleUserName" }
Add project
POSTUrl:
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a new project
Body:
{ "createdByName": "createdByName", "cost": 1911.6743545966751, "created": 2840, "description": "description", "customerName": "customerName", "stockValue": 7949.244923724827, "name": "name", "customerId": 6703, "state": "0", "responsibleUserId": 6051, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7753.49269763813, "batchSnBestBefore": 9416, "accountName": "accountName", "articleId": "articleId", "priceListId": 3419, "purchasePrice": 9006.139025457882, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 5021, "checkoutDate": 8378, "price": 9950.006030178965, "comment": "comment", "id": 1732, "projectId": 3766, "checkoutAmount": 1010.8737399557532, "events": [{ "date": 1751420620791, "amount": 2086.3164650140275, "type": "type" }], "checkinConsumeDate": 1751420620791, "checkinAmount": 3153.3999259802804, "consumedAmount": 4602.258151223258 }], "createdById": 923, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 3001.329716508556, "created": 613, "description": "description", "customerName": "customerName", "stockValue": 9548.780960061018, "name": "name", "customerId": 9613, "state": "0", "projectId": 66, "responsibleUserId": 1043, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6809.253954094711, "batchSnBestBefore": 3116, "accountName": "accountName", "articleId": "articleId", "priceListId": 8097, "purchasePrice": 4396.137979429616, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 445, "checkoutDate": 182, "price": 5181.264698226129, "comment": "comment", "id": 412, "projectId": 2477, "checkoutAmount": 3487.0445198195375, "events": [{ "date": 1751420620792, "amount": 281.9309121293423, "type": "type" }], "checkinConsumeDate": 1751420620792, "checkinAmount": 3633.179591919129, "consumedAmount": 153.69984847884876 }], "createdById": 2553, "responsibleUserName": "responsibleUserName" }
Add project
POSTUrl: /customer_order/{customer_order_id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a new project
Body:
{"projectId": 6058}
Successfull response:
{ "createdByName": "createdByName", "cost": 191.93532430766936, "created": 3085, "description": "description", "customerName": "customerName", "stockValue": 3109.2280671647354, "name": "name", "customerId": 2701, "state": "0", "projectId": 3440, "responsibleUserId": 8736, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7388.007211434337, "batchSnBestBefore": 4948, "accountName": "accountName", "articleId": "articleId", "priceListId": 8142, "purchasePrice": 6438.485291103092, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3937, "checkoutDate": 245, "price": 6569.830885983882, "comment": "comment", "id": 1885, "projectId": 5763, "checkoutAmount": 9869.335398632464, "events": [{ "date": 1751420620792, "amount": 8606.049536101837, "type": "type" }], "checkinConsumeDate": 1751420620792, "checkinAmount": 1875.1475358119728, "consumedAmount": 5559.8306124456485 }], "createdById": 7785, "responsibleUserName": "responsibleUserName" }
Add project article
POSTUrl: /{id}/article
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a new article to a project
Body:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2088.5175065243657, "batchSnBestBefore": 9215, "accountName": "accountName", "articleId": "articleId", "priceListId": 1408, "purchasePrice": 3659.404647297335, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9348, "checkoutDate": 3225, "price": 7119.7117926762885, "comment": "comment", "id": 567, "projectId": 3868, "checkoutAmount": 1314.0940461929217, "events": [{ "date": 1751420620792, "amount": 2207.0895082702623, "type": "type" }], "checkinConsumeDate": 1751420620792, "checkinAmount": 1514.3511811215071, "consumedAmount": 6717.84869364369 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9314.016823311129, "batchSnBestBefore": 8601, "accountName": "accountName", "articleId": "articleId", "priceListId": 3962, "purchasePrice": 7423.042393556252, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1738, "checkoutDate": 6783, "price": 709.4790856146626, "comment": "comment", "id": 2750, "projectId": 1953, "checkoutAmount": 3515.408638371521, "events": [{ "date": 1751420620792, "amount": 7548.7385459160105, "type": "type" }], "checkinConsumeDate": 1751420620792, "checkinAmount": 198.47916770889816, "consumedAmount": 9949.385126536443 }
Send invoice drafts to external integrations
PUTUrl: /{id}/invoice
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Send existing invoice drafts to external integrations and sets the draft to invoiced
Body:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 7220.465077784976, "articleName": "articleName", "pricelistId": 7738, "endDate": 1751420620793, "rentalAmount": 1185.9713680678208, "created": 1751420620793, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 5601, "price": 8963.198231514116, "isProcessed": true, "dataArticleId": 899, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 5324, "startDate": 1751420620793, "createdById": 8859 }], "freeTexts": [{}], "customerId": 8402, "type": "type", "projectId": 5842 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 1316.8211720046518, "articleName": "articleName", "pricelistId": 8068, "endDate": 1751420620793, "rentalAmount": 6986.612136049586, "created": 1751420620793, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 2401, "price": 8650.932099801039, "isProcessed": true, "dataArticleId": 9583, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 5777, "startDate": 1751420620793, "createdById": 3506 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9322.988270904687, "batchSnBestBefore": 9784, "accountName": "accountName", "articleId": "articleId", "priceListId": 3407, "purchasePrice": 6745.833719668312, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4594, "checkoutDate": 7139, "price": 6978.922030770881, "comment": "comment", "id": 4989, "projectId": 6601, "checkoutAmount": 5261.771516049906, "events": [{ "date": 1751420620793, "amount": 7144.652917360019, "type": "type" }], "checkinConsumeDate": 1751420620793, "checkinAmount": 2418.0048455572833, "consumedAmount": 2889.835654216777 }] }
Close project
PUTUrl: /{id}/close
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Close an existing project
Body:
{"closeArticles": {}}
Successfull response:
{ "createdByName": "createdByName", "cost": 4784.799202354778, "created": 1798, "description": "description", "customerName": "customerName", "stockValue": 9697.687230862712, "name": "name", "customerId": 9249, "state": "0", "projectId": 6250, "responsibleUserId": 5222, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 291.9463297822222, "batchSnBestBefore": 2032, "accountName": "accountName", "articleId": "articleId", "priceListId": 7288, "purchasePrice": 9510.1095227644, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1853, "checkoutDate": 7754, "price": 4521.287508083695, "comment": "comment", "id": 482, "projectId": 433, "checkoutAmount": 8766.074633865415, "events": [{ "date": 1751420620793, "amount": 9909.700721390871, "type": "type" }], "checkinConsumeDate": 1751420620793, "checkinAmount": 2345.4552930341333, "consumedAmount": 6069.089344277055 }], "createdById": 7646, "responsibleUserName": "responsibleUserName" }
Update project
PUTUrl: /{id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Update an existing project
Body:
{ "createdByName": "createdByName", "cost": 6088.767508652203, "created": 3676, "description": "description", "customerName": "customerName", "stockValue": 1784.2280760971685, "name": "name", "customerId": 2098, "state": "0", "projectId": 387, "responsibleUserId": 6822, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4848.974659714647, "batchSnBestBefore": 913, "accountName": "accountName", "articleId": "articleId", "priceListId": 7782, "purchasePrice": 1273.6068546123424, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6634, "checkoutDate": 7217, "price": 6753.954403936836, "comment": "comment", "id": 5257, "projectId": 3870, "checkoutAmount": 6003.330419056051, "events": [{ "date": 1751420620794, "amount": 1009.370613938051, "type": "type" }], "checkinConsumeDate": 1751420620794, "checkinAmount": 4652.424860349752, "consumedAmount": 3492.67486202381 }], "createdById": 5060, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 142.7607818573262, "created": 9316, "description": "description", "customerName": "customerName", "stockValue": 1770.530393528672, "name": "name", "customerId": 9833, "state": "0", "projectId": 2006, "responsibleUserId": 9421, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2842.501322994969, "batchSnBestBefore": 925, "accountName": "accountName", "articleId": "articleId", "priceListId": 8236, "purchasePrice": 9180.803351444958, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 5568, "checkoutDate": 1566, "price": 2543.6357142373877, "comment": "comment", "id": 267, "projectId": 4166, "checkoutAmount": 1164.4472329026212, "events": [{ "date": 1751420620794, "amount": 5239.849612215483, "type": "type" }], "checkinConsumeDate": 1751420620794, "checkinAmount": 3530.4539346883225, "consumedAmount": 3641.572180059619 }], "createdById": 4250, "responsibleUserName": "responsibleUserName" }
Update project article
PUTUrl: /{id}/article/{article_id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Update an existing project article
Body:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6619.482561752975, "batchSnBestBefore": 8710, "accountName": "accountName", "articleId": "articleId", "priceListId": 879, "purchasePrice": 7392.252218953271, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2137, "checkoutDate": 620, "price": 9023.34327008837, "comment": "comment", "id": 7950, "projectId": 7532, "checkoutAmount": 2071.6580349473857, "events": [{ "date": 1751420620794, "amount": 6053.688024376353, "type": "type" }], "checkinConsumeDate": 1751420620794, "checkinAmount": 3540.5981666853704, "consumedAmount": 7696.983627641101 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 1138.1540549685642, "articleName": "articleName", "pricelistId": 3066, "endDate": 1751420620794, "rentalAmount": 9833.636074412057, "created": 1751420620794, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 797, "price": 2426.4227679559845, "isProcessed": false, "dataArticleId": 9625, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 6629, "startDate": 1751420620794, "createdById": 2458 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2867.3595667613727, "batchSnBestBefore": 9813, "accountName": "accountName", "articleId": "articleId", "priceListId": 4366, "purchasePrice": 6363.10762976383, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4341, "checkoutDate": 231, "price": 1998.3452447504224, "comment": "comment", "id": 4600, "projectId": 2550, "checkoutAmount": 314.3924304317491, "events": [{ "date": 1751420620794, "amount": 2711.6356512363027, "type": "type" }], "checkinConsumeDate": 1751420620794, "checkinAmount": 6654.658292323079, "consumedAmount": 6419.672862479836 }] }
Create invoice drafts
PUTUrl: /{id}/invoice/draft
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Create invoice drafts for articles in a project
Body:
{ "projectId": 4670, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7786.7176118438865, "batchSnBestBefore": 4911, "accountName": "accountName", "articleId": "articleId", "priceListId": 4485, "purchasePrice": 6359.905549755428, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3697, "checkoutDate": 5100, "price": 5089.47435104863, "comment": "comment", "id": 3391, "projectId": 8568, "checkoutAmount": 1149.8600691796134, "events": [{ "date": 1751420620795, "amount": 6262.993094534119, "type": "type" }], "checkinConsumeDate": 1751420620795, "checkinAmount": 9233.758237063927, "consumedAmount": 4545.259912644831 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 8292.199154917607, "articleName": "articleName", "pricelistId": 3771, "endDate": 1751420620795, "rentalAmount": 9818.439322205071, "created": 1751420620795, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 6864, "price": 2010.4673136656536, "isProcessed": false, "dataArticleId": 5882, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 3001, "startDate": 1751420620795, "createdById": 9349 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4670.014510087542, "batchSnBestBefore": 4348, "accountName": "accountName", "articleId": "articleId", "priceListId": 7231, "purchasePrice": 7463.624045373945, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5969, "checkoutDate": 7193, "price": 7565.068060021896, "comment": "comment", "id": 3117, "projectId": 989, "checkoutAmount": 9698.917916546781, "events": [{ "date": 1751420620795, "amount": 5552.969108963741, "type": "type" }], "checkinConsumeDate": 1751420620795, "checkinAmount": 431.0189406033682, "consumedAmount": 3347.880767874929 }] }
Classes:
CloseProjectRequestDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
closeArticles | HashMap | Map containing articles that should be handled when closing a project. Key in map is project-article id and value is from enum set | Value in map can be either checkin, consume, end_rent | R,W |
InvoiceDraftDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | R | |||||
dataType | String | R | |||||
dataId | Long | R | |||||
dataArticleId | Long | R | |||||
articleId | String | R | |||||
articleName | String | R | |||||
amount | Double | R | |||||
price | Double | R | |||||
pricelistId | long | R | |||||
currency | String | R | |||||
rentalCurrency | String | R | |||||
startDate | Date | R | |||||
endDate | Date | R | |||||
rentalAmount | Double | R | |||||
comment | String | R | |||||
isInvoiced | boolean | Indicates if row has been marked as invoiced | R | ||||
isProcessed | boolean | Indicates if row has been completely processed as invoiced | R | ||||
invoiceId | String | If row has been invoiced, this is id of the created invoice | R | ||||
createdById | Long | R | |||||
createdByName | String | R | |||||
created | Date | R |
InvoiceDraftProjectArticlesRequestDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
articles | List | R |
InvoiceProjectArticlesRequestDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
customerId | Long | R | |||||
type | String | invoice, cash, card, ag | R | ||||
invoiceDrafts | List | R | |||||
freeTexts | List | R,W |
InvoiceProjectArticlesResponseDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
articles | List | R | |||||
invoiceDrafts | List | R |
ProjectArticleDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | R,W | |||||
projectId | long | R,W | |||||
articleId | String | R,W | |||||
articleName | String | R,W | |||||
batchId | String | R,W | |||||
snId | String | R,W | |||||
batchSnBestBefore | Long | R,W | |||||
checkoutAmount | Double | R,W | |||||
checkinAmount | Double | R,W | |||||
consumedAmount | Double | R,W | |||||
invoicedAmount | Double | R,W | |||||
priceListId | long | R,W | |||||
rental | boolean | R,W | |||||
price | double | R,W | |||||
rentalCurrency | String | R,W | |||||
comment | String | R,W | |||||
purchasePrice | Double | R,W | |||||
events | List | R,W | |||||
accountId | long | R,W | |||||
accountName | String | R,W | |||||
checkoutDate | Long | R,W | |||||
checkinConsumeDate | Date | R,W |
ProjectArticleEventDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
type | String | R,W | |||||
amount | double | R,W | |||||
date | Date | R,W |
ProjectArticlesResponseDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
projectsCount | int | R | |||||
articles | List | R |
ProjectCustomerOrderRequestDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | Long | A new project will be created if the id is null or -1 | R,W |
ProjectDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
name | String | R,W | |||||
customerId | Long | R,W | |||||
customerName | String | R,W | |||||
description | String | R,W | |||||
state | Integer | Write only with POST | 0 | NEW = 0, DEVELOPING = 1, FINISHED = 2, CANCELLED = 3 |
R,W | ||
responsibleUserId | Long | R,W | |||||
responsibleUserName | String | R,W | |||||
createdById | Long | R,W | |||||
createdByName | String | R,W | |||||
created | long | R,W | |||||
articles | List | R,W | |||||
cost | Double | R,W | |||||
stockValue | Double | R,W |
ProjectInvoiceDraftsResponseDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
draftsCount | int | R | |||||
invoiceDrafts | List | R |
ProjectsResponseDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
projectsCount | int | R | |||||
projects | List | R |