SOAP API
SOAP API is supplied primary for integration with Visma
Location
Address: https://www.prosjektkalkulator.no/soap?wsdl
Authentication
Access to SOAP API is only available using separate user accounts created for SOAP. An account can be created by an administrator in this page: Innstillinger -> Brukere
Create a SOAP header with the name 'UsernameToken'. Two attributes are required: 'Username' and 'Password'. The service is supposed to retain session data, meaning login is only required at the first request in an session. This has not been tested however. The safe option would be to include the header with all calls.
PHP example
$auth = new \stdClass(); $auth->Username = 'brukernavn'; $auth->Password = 'passord'; $header = new \SoapHeader('auth', 'UsernameToken', $auth, true);
Complex datatypes
The following complex types are used. Please see the wsdl for details.
- Product
- ArrayOfProduct
- Item
- ArrayOfItem
- Unit
- ArrayOfUnit
- Quotation
Available services
helloWorld
Description
Used for testing. Does not require login.
Request
Parameter | Type | Mandatory/Optional | Comments |
---|---|---|---|
void |
Response
Name | Type | Description |
---|---|---|
string | The string "Hello World!" |
getQuotationById
Description
Get a Quotation. The object is returned with the related objects Unit, Item and Product populated.
Request
Parameter | Type | Mandatory/Optional | Comments |
---|---|---|---|
id | int | Database table primary key |
Response
Name | Type | Description |
---|---|---|
return | Quotation | Complex type Quotation |
getQuotationByCustomId
Description
Get a Quotation by the Quotation number chosed by the user. Custom id is unique within each group/company. The object is returned with the related objects Unit, Item and Product populated.
Request
Parameter | Type | Mandatory/Optional | Comments |
---|---|---|---|
custom_id | int | custom_id field. |
Response
Name | Type | Description |
---|---|---|
return | Quotation | Complex type Quotation |
getProductSummaryByQuotationId
Description
Returns a list of all the products related to a Quotation. Products of same efonumber, description and price are added together.
Request
Parameter | Type | Mandatory/Optional | Comments |
---|---|---|---|
id | int | Database table primary key |
Response
Name | Type | Description |
---|---|---|
return | Product[] | Array of complex type Product |
getProductSummaryByQuotationCustomId
Description
Returns a list of all the products related to a Quotation. Products of same efonumber, description and price are added together. Custom id is unique within each group/company.
Request
Parameter | Type | Mandatory/Optional | Comments |
---|---|---|---|
custom_id | int | custom_id field |
Response
Name | Type | Description |
---|---|---|
return | Product[] | Array of complex type Product |