SOAP API: Forskjell mellom sideversjoner
Ingen redigeringsforklaring |
|||
Linje 64: | Linje 64: | ||
|- | |- | ||
| id | | id | ||
| | | int | ||
| Database table primary key | | Database table primary key | ||
Linje 77: | Linje 77: | ||
|- | |- | ||
| 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 === | |||
{| class="wikitable" | |||
! Parameter | |||
! Type | |||
! Mandatory/Optional | |||
! Comments | |||
|- | |||
| id | |||
| int | |||
| custom_id field. | |||
|} | |||
=== Response === | |||
{| class="wikitable" | |||
! Name | |||
! Type | |||
! Description | |||
|- | |||
| return | |||
| Quotation | | Quotation | ||
| Complex type Quotation | | Complex type Quotation | ||
|} | |} |
Sideversjonen fra 4. mai 2015 kl. 22:26
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 |