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 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": 7744.15941855402, "articleName": "articleName", "pricelistId": 6664, "endDate": 1758175187436, "rentalAmount": 4921.548292491869, "created": 1758175187436, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 3804, "price": 7274.746436068183, "isProcessed": true, "dataArticleId": 9782, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 3629, "startDate": 1758175187436, "createdById": 3223 }], "pages": 6123, "pageSize": 7826, "draftsCount": 5608, "page": 2263 }
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": 7537.425902501314, "created": 4852, "description": "description", "customerName": "customerName", "stockValue": 5945.311022825047, "name": "name", "customerId": 4247, "state": "0", "projectId": 6065, "responsibleUserId": 7546, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3899.2742532602942, "batchSnBestBefore": 8640, "accountName": "accountName", "articleId": "articleId", "priceListId": 9946, "purchasePrice": 1138.0957019151106, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2314, "checkoutDate": 360, "price": 6462.716323628494, "comment": "comment", "id": 1903, "projectId": 2460, "checkoutAmount": 9935.460212214457, "events": [{ "date": 1758175187437, "amount": 1569.2202736940808, "type": "type" }], "checkinConsumeDate": 1758175187437, "checkinAmount": 8294.343915846364, "consumedAmount": 2722.334017143715 }], "createdById": 398, "responsibleUserName": "responsibleUserName" }
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": 5379, "projects": [{ "createdByName": "createdByName", "cost": 2428.196221447737, "created": 1929, "description": "description", "customerName": "customerName", "stockValue": 3687.920151899602, "name": "name", "customerId": 5150, "state": "0", "projectId": 5221, "responsibleUserId": 6051, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 305.23132686758106, "batchSnBestBefore": 4688, "accountName": "accountName", "articleId": "articleId", "priceListId": 7187, "purchasePrice": 5479.1348089451185, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1467, "checkoutDate": 1294, "price": 5786.642922729183, "comment": "comment", "id": 130, "projectId": 2509, "checkoutAmount": 9276.16116953677, "events": [{ "date": 1758175187437, "amount": 416.8845922700382, "type": "type" }], "checkinConsumeDate": 1758175187437, "checkinAmount": 9031.449594116344, "consumedAmount": 1589.878033099167 }], "createdById": 8682, "responsibleUserName": "responsibleUserName" }], "pageSize": 3493, "page": 822, "projectsCount": 8552 }
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": 1255, "projects": [{ "createdByName": "createdByName", "cost": 6420.71546866124, "created": 3523, "description": "description", "customerName": "customerName", "stockValue": 4400.9531799597835, "name": "name", "customerId": 3986, "state": "0", "projectId": 1640, "responsibleUserId": 6088, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3305.8629352519474, "batchSnBestBefore": 6499, "accountName": "accountName", "articleId": "articleId", "priceListId": 9472, "purchasePrice": 9775.915621698095, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5006, "checkoutDate": 8283, "price": 1544.820978050777, "comment": "comment", "id": 292, "projectId": 2697, "checkoutAmount": 6823.710820488699, "events": [{ "date": 1758175187437, "amount": 3677.248845725042, "type": "type" }], "checkinConsumeDate": 1758175187437, "checkinAmount": 3041.365002595312, "consumedAmount": 901.3232173352648 }], "createdById": 9388, "responsibleUserName": "responsibleUserName" }], "pageSize": 3914, "page": 4728, "projectsCount": 3516 }
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": 687, "pageSize": 9921, "page": 4632, "projectsCount": 1744, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9071.836379085536, "batchSnBestBefore": 8504, "accountName": "accountName", "articleId": "articleId", "priceListId": 889, "purchasePrice": 8555.913357628455, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 6534, "checkoutDate": 9362, "price": 4905.648171887975, "comment": "comment", "id": 6041, "projectId": 6144, "checkoutAmount": 8456.635837722763, "events": [{ "date": 1758175187438, "amount": 2840.447415544358, "type": "type" }], "checkinConsumeDate": 1758175187438, "checkinAmount": 2009.9188206661956, "consumedAmount": 4210.939787171753 }] }
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": 464.8955472936833, "articleName": "articleName", "pricelistId": 2331, "endDate": 1758175187438, "rentalAmount": 631.7156765624876, "created": 1758175187438, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 7558, "price": 998.27354570734, "isProcessed": true, "dataArticleId": 1338, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 9042, "startDate": 1758175187438, "createdById": 7206 }], "pages": 6947, "pageSize": 481, "draftsCount": 7257, "page": 3950 }
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": 8066.16910321964, "created": 866, "description": "description", "customerName": "customerName", "stockValue": 4861.9978557058175, "name": "name", "customerId": 7850, "state": "0", "responsibleUserId": 8564, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3410.766823202519, "batchSnBestBefore": 4706, "accountName": "accountName", "articleId": "articleId", "priceListId": 8602, "purchasePrice": 5057.0691016607125, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 324, "checkoutDate": 3142, "price": 4035.507163809009, "comment": "comment", "id": 9095, "projectId": 947, "checkoutAmount": 288.70329889271517, "events": [{ "date": 1758175187438, "amount": 87.1289875234138, "type": "type" }], "checkinConsumeDate": 1758175187438, "checkinAmount": 6961.593345977451, "consumedAmount": 443.91440766797353 }], "createdById": 6536, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 6539.740589719426, "created": 5122, "description": "description", "customerName": "customerName", "stockValue": 7352.662144889665, "name": "name", "customerId": 2902, "state": "0", "projectId": 2286, "responsibleUserId": 9445, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9434.79262967748, "batchSnBestBefore": 286, "accountName": "accountName", "articleId": "articleId", "priceListId": 8127, "purchasePrice": 1131.8087166277392, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 4979, "checkoutDate": 6624, "price": 3993.194691794678, "comment": "comment", "id": 2602, "projectId": 4493, "checkoutAmount": 5391.110583275647, "events": [{ "date": 1758175187438, "amount": 6251.197280724028, "type": "type" }], "checkinConsumeDate": 1758175187438, "checkinAmount": 9949.728521066538, "consumedAmount": 3241.739431993519 }], "createdById": 7582, "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": 2514}
Successfull response:
{ "createdByName": "createdByName", "cost": 4682.394828371588, "created": 937, "description": "description", "customerName": "customerName", "stockValue": 2003.4209549024517, "name": "name", "customerId": 1580, "state": "0", "projectId": 2207, "responsibleUserId": 57, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3218.5380775099916, "batchSnBestBefore": 5267, "accountName": "accountName", "articleId": "articleId", "priceListId": 421, "purchasePrice": 8748.639216942669, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4125, "checkoutDate": 6949, "price": 5012.21215577511, "comment": "comment", "id": 1154, "projectId": 2144, "checkoutAmount": 7355.242401272265, "events": [{ "date": 1758175187438, "amount": 6126.263277651246, "type": "type" }], "checkinConsumeDate": 1758175187438, "checkinAmount": 8315.354975466262, "consumedAmount": 9115.345298049042 }], "createdById": 7735, "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": 1672.959927495189, "batchSnBestBefore": 7171, "accountName": "accountName", "articleId": "articleId", "priceListId": 8352, "purchasePrice": 807.9029718232789, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 6026, "checkoutDate": 2000, "price": 3093.3304697278054, "comment": "comment", "id": 8133, "projectId": 1023, "checkoutAmount": 6173.061156641018, "events": [{ "date": 1758175187439, "amount": 6648.25465200698, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 9793.564730551523, "consumedAmount": 74.31647910488226 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9684.033440432046, "batchSnBestBefore": 724, "accountName": "accountName", "articleId": "articleId", "priceListId": 6544, "purchasePrice": 879.5298179512146, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 4146, "checkoutDate": 6596, "price": 9929.781387014898, "comment": "comment", "id": 3006, "projectId": 1886, "checkoutAmount": 3974.3470409525926, "events": [{ "date": 1758175187439, "amount": 8276.783886961342, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 5297.468890211052, "consumedAmount": 732.2163257802516 }
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": 8064.205915018966, "created": 3660, "description": "description", "customerName": "customerName", "stockValue": 4430.872666330057, "name": "name", "customerId": 9, "state": "0", "projectId": 1069, "responsibleUserId": 4286, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6454.157407022974, "batchSnBestBefore": 5747, "accountName": "accountName", "articleId": "articleId", "priceListId": 7620, "purchasePrice": 198.97992731131353, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5667, "checkoutDate": 2221, "price": 7254.217781886946, "comment": "comment", "id": 336, "projectId": 5564, "checkoutAmount": 1531.5160376622493, "events": [{ "date": 1758175187439, "amount": 3139.3785085013183, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 4319.947584458984, "consumedAmount": 9251.96924712425 }], "createdById": 3720, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 3422.466863305663, "created": 5739, "description": "description", "customerName": "customerName", "stockValue": 858.7594777730701, "name": "name", "customerId": 5304, "state": "0", "projectId": 894, "responsibleUserId": 2411, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 821.9985167805887, "batchSnBestBefore": 6056, "accountName": "accountName", "articleId": "articleId", "priceListId": 5111, "purchasePrice": 8089.463565040296, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 330, "checkoutDate": 5322, "price": 1259.8002865092806, "comment": "comment", "id": 2529, "projectId": 6938, "checkoutAmount": 3272.0087457738246, "events": [{ "date": 1758175187439, "amount": 5959.0600904549565, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 5807.095681842889, "consumedAmount": 4453.341645539417 }], "createdById": 4693, "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": 7212.636471598118, "batchSnBestBefore": 4742, "accountName": "accountName", "articleId": "articleId", "priceListId": 2971, "purchasePrice": 3516.0771269207503, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6569, "checkoutDate": 9299, "price": 7436.905218689795, "comment": "comment", "id": 2736, "projectId": 5166, "checkoutAmount": 7022.746883304908, "events": [{ "date": 1758175187439, "amount": 5201.369808606702, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 8896.10287472072, "consumedAmount": 7872.630654634066 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 9100.368875703649, "articleName": "articleName", "pricelistId": 4105, "endDate": 1758175187439, "rentalAmount": 6433.467943599128, "created": 1758175187439, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 1077, "price": 8442.368623434751, "isProcessed": false, "dataArticleId": 2410, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 1267, "startDate": 1758175187439, "createdById": 7996 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2320.1170699894124, "batchSnBestBefore": 5189, "accountName": "accountName", "articleId": "articleId", "priceListId": 1615, "purchasePrice": 5655.282739455319, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6119, "checkoutDate": 4245, "price": 9932.349959294648, "comment": "comment", "id": 3640, "projectId": 6631, "checkoutAmount": 2880.5225491997057, "events": [{ "date": 1758175187439, "amount": 9141.88983963531, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 42.95719482531379, "consumedAmount": 1674.7736524778268 }] }
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": 6227, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 886.5818261724146, "batchSnBestBefore": 1602, "accountName": "accountName", "articleId": "articleId", "priceListId": 5109, "purchasePrice": 5606.15204326996, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3219, "checkoutDate": 6172, "price": 8853.219777097436, "comment": "comment", "id": 5801, "projectId": 2091, "checkoutAmount": 1988.834731541077, "events": [{ "date": 1758175187439, "amount": 747.6898761320039, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 3019.803189974526, "consumedAmount": 8765.691414435449 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 4948.063524983532, "articleName": "articleName", "pricelistId": 2991, "endDate": 1758175187439, "rentalAmount": 4122.406033299962, "created": 1758175187439, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 379, "price": 6066.713492249492, "isProcessed": false, "dataArticleId": 6481, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 6373, "startDate": 1758175187439, "createdById": 1652 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 867.485378844689, "batchSnBestBefore": 3083, "accountName": "accountName", "articleId": "articleId", "priceListId": 5847, "purchasePrice": 7917.1685255717175, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8471, "checkoutDate": 5369, "price": 5280.009082572394, "comment": "comment", "id": 1386, "projectId": 8548, "checkoutAmount": 4444.201876165005, "events": [{ "date": 1758175187439, "amount": 984.5059210778539, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 5624.53416634502, "consumedAmount": 8484.781421253156 }] }
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": 5372.593057419715, "articleName": "articleName", "pricelistId": 8559, "endDate": 1758175187439, "rentalAmount": 8973.812414075663, "created": 1758175187439, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 8815, "price": 2935.5336417799217, "isProcessed": false, "dataArticleId": 5840, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 3596, "startDate": 1758175187439, "createdById": 2405 }], "freeTexts": [{}], "customerId": 2198, "type": "type", "projectId": 1642 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 7416.726298207302, "articleName": "articleName", "pricelistId": 9262, "endDate": 1758175187439, "rentalAmount": 5904.415120901704, "created": 1758175187439, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 1076, "price": 9987.545261275724, "isProcessed": true, "dataArticleId": 1351, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8248, "startDate": 1758175187439, "createdById": 7611 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 68.15588464520906, "batchSnBestBefore": 6179, "accountName": "accountName", "articleId": "articleId", "priceListId": 2777, "purchasePrice": 4942.078431776183, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3587, "checkoutDate": 520, "price": 4599.8649503541665, "comment": "comment", "id": 7281, "projectId": 7858, "checkoutAmount": 7162.951217438318, "events": [{ "date": 1758175187439, "amount": 6941.175251460283, "type": "type" }], "checkinConsumeDate": 1758175187439, "checkinAmount": 3088.9797787438147, "consumedAmount": 1121.743679913705 }] }
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": 6770.0547339585555, "created": 4507, "description": "description", "customerName": "customerName", "stockValue": 3189.998744188931, "name": "name", "customerId": 5695, "state": "0", "projectId": 6138, "responsibleUserId": 881, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4360.201839782404, "batchSnBestBefore": 3748, "accountName": "accountName", "articleId": "articleId", "priceListId": 7370, "purchasePrice": 6040.221732579497, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9076, "checkoutDate": 585, "price": 9122.760346558229, "comment": "comment", "id": 2215, "projectId": 3791, "checkoutAmount": 6080.904996995502, "events": [{ "date": 1758175187440, "amount": 934.1797265152319, "type": "type" }], "checkinConsumeDate": 1758175187440, "checkinAmount": 7267.134215816778, "consumedAmount": 3078.264868667824 }], "createdById": 6703, "responsibleUserName": "responsibleUserName" }
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 |