SOAP API
SOAP API er laget primært for integrasjon med Visma.
Lokasjon
Adresse: http://prosjektkalkulator.no/soap?wsdl
Innlogging
Tilgang til SOAP API er kun tilgjengelig med egne brukerkontoer opprettet for SOAP. En slik konto kan opprettes av brukerne av systemet på siden Innstillinger->Brukere
Opprett en SOAP header med navn 'UsernameToken'. Den skal ha to attributter: 'Username' og 'Password'. Hvis clienten håndterer sessiondata så tror jeg innlogging er bare nødvendig på første kall, men jeg har ikke testet det. Det sikre er vel å ta med headeren på alle forsespørsler.
Eksempel i PHP:
$auth = new \stdClass(); $auth->Username = 'brukernavn'; $auth->Password = 'passord'; $header = new \SoapHeader('auth', 'UsernameToken', $auth, true);
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 |
---|---|---|---|
id | int | custom_id field. |
Response
Name | Type | Description |
---|---|---|
return | Quotation | Complex type Quotation |