Transactions
Retrieve all transactions for a specific company from Basecone.
GET transactions?companyId=:id
Request properties
Property | Type | Description | Optional |
---|---|---|---|
companyId | Guid | Company Unique Identifier. | No |
For more details on collection requests see Collection details and Optional fields.
Searching
Search can be performed using the following fields:
Field | Type | Description |
---|---|---|
Relation | String | Customer or Suplier (available only for Purchases and Sales)GET transactions?companyId=:id&relation=:customer_supplier |
TransactionNumber | String | Transaction numberGET transactions?companyId=:id&transactionNumber=:number |
TransactionDate | String/ Range | Transaction date (must be set in en-GB culture yyyy-MM-dd).
By default: [ "2000-01-01", current date plus 1 year ] GET transactions?companyId=:id&transactionDate=:date GET transactions?companyId=:id&transactionDate=[:date,:date]By range: GET transactions?companyId=:id&transactionDate=["2015-01-01","2016-01-01"]By exact value: GET transactions?companyId=:id&transactionDate=2015-01-01 |
TotalAmount | String/ Range | Total amount (can be a negative one also and must be set in en-GB culture 0.00 )GET transactions?companyId=:id&totalAmount=:amount GET transactions?companyId=:id&totalAmount=[:amount,:amount] |
BookYear | Int | Book year from PeriodGET transactions?companyId=:id&bookYear=:year |
Sorting
Sorting can be performed by using the sort parameter, for the following properties:
Property |
---|
Relation - supplier/customer name (note that this parameter does not belong to the response properties) |
TransactionNumber |
TransactionDate |
TotalAmount |
BookYear |
Transaction collection properties
Property | Type | Description |
---|---|---|
Transactions | Array | A list of transactions. |
_links | Array | A list of useful preconfigured uri's a client app can use to navigate this resource collection. |
_metadata | Complex object | Optional object with additional information concerning the current returned result. |
For details on transaction properties see transaction details.
Example response:
{ "transactions": [ { "type": "Sales", "description": "", "dueDate": "2016-04-30T00:00:00", "invoiceNumber": "6582802104594209-33", "customer": { "customerId": "e2f43f43-5358-41c8-a211-ee578badd1ac", "code": "8952", "name": "Telefooncompany B.V." }, "paymentCondition": { "paymentConditionId": "56a7a0d7-a8f6-451f-a406-243b5bcb2b49", "code": "00" }, "isInPaymentBatch": true, "isCreditNote": false, "totalAmount": 188.88, "transactionId": "d5df709d-d523-4462-9c19-bb233f8979a3", "documentId": "487460c4-5e61-432d-b1c1-4fb6c9074392", "targetCompany": { "code": "5" }, "destinationCompany": { "code": "5" }, "transactionNumber": "16700005", "transactionDate": "2016-03-31T00:00:00", "generalLedger": { "generalLedgerId": "15a33fa9-def7-4106-8af2-2cf5ef86366a", "code": "1300" }, "period": "2016/3", "currency": { "currencyId": "b5e42d0a-97a1-4185-96b5-55cc03029a72", "code": "EUR" }, "additionalField1": null, "additionalField2": null, "additionalField3": "AAAwwg==487460C45E61432DB1C14FB6C9074392", "isFinalBooking": false, "bookYear": 2016 }, { "type": "Purchase", "description": "", "dueDate": "2016-04-30T00:00:00", "invoiceNumber": "2713-2016-3411", "purchaseOrderNumber": null, "supplier": { "supplierId": "10f1cd3a-d7a7-4d11-96a4-a73e9568d622", "code": "8971", "name": "basecone" }, "paymentCondition": { "paymentConditionId": "56a7a0d7-a8f6-451f-a406-243b5bcb2b49", "code": "00" }, "isInPaymentBatch": true, "isCreditNote": false, "totalAmount": 255.46, "transactionId": "5d2c2aae-7a16-4857-aaa9-1ab8a42411b2", "documentId": "c4079fc8-2b38-4e35-ac16-a084c6b6ccc7", "targetCompany": { "code": "5" }, "destinationCompany": { "code": "5" }, "transactionNumber": "16600062", "transactionDate": "2016-03-31T00:00:00", "generalLedger": { "generalLedgerId": "d0d9e73b-bd8a-41d9-90bb-fc3b79268758", "code": "1600" }, "period": "2016/3", "currency": { "currencyId": "b5e42d0a-97a1-4185-96b5-55cc03029a72", "code": "EUR" }, "additionalField1": null, "additionalField2": null, "additionalField3": "AAAwwg==C4079FC82B384E35AC16A084C6B6CCC7", "isFinalBooking": false, "bookYear": 2016 } ], "_links": [{ "rel" : "self", "href" : "https://api.basecone.com/v1/transactions?companyId=c4b10a94-7c73-40da-b018-74693241024d&limit=2&offset=0" } ], "_metadata" : { "total" : 14, "count" : 2 } }
Possible error responses
Status code | Error code | Details |
---|---|---|
400 | validation_error | One or more validation errors occurred. |
400 | validation_error | User is not allowed to the company |
400 | validation_error | an unknown error occurred |
400 | validation_error | One or more properties were not valid |
400 | invalid_request_payload | Company id cannot be empty |
400 | invalid_request_payload | One or more validation errors occurred. |
401 | unauthorized | User is not authorized to access the resource. |
403 | forbidden | User has no rights to execute the requested operation |