# CompanyService API

### URL

Efter installation av *Company Service API* nås webbtjänsten från sidan:

{% embed url="<http://localhost/CompanyService.svc>" %}

### Teknisk dokumentation (WSDL)

{% file src="/files/WicmOA21DZVh1MV1C7IS" %}

### Metoder

```csharp
Company[] GetCompanies();
Company[] GetCompaniesBy(CompanyType companyType);
Company GetCompany(int Id);
int CreateCompany(Company company);
void UpdateCompany(Company company);
void DeleteCompany(Company company);

Contact[] GetContacts();
int CreateContact(Contact contact);
void UpdateContact(Contact contact);
void DeleteContact (Contact contact);
```

### Data

```csharp
public class Company
{
        public int Id { get; set; }
        public string Number { get; set; }
        public string Name { get; set; }
        public string Department { get; set; }
        public string OrgNumber { get; set; }
        public string CountryCode { get; set; }
        public string Address { get; set; }
        public string ZipCode { get; set; }
        public string City { get; set; }
        public string VisitingAddress { get; set; }
        public string Homepage { get; set; }
        public string Phone { get; set; }
        public string Fax { get; set; }
        public bool IsCustomer { get; set; }
        public bool IsProspect { get; set; }
        public bool IsSupplier { get; set; }
        public string OldNumber { get; set; }
        public int CustomerLimit { get; set; }
        public int CustomerBalance { get; set; }
        public int VAT { get; set; }
        public bool Export { get; set; }
        public bool EU { get; set; }
        public bool CreditStop { get; set; }
}

public enum CompanyType
{
        Prospect = 1,
        Customer = 2,
        Supplier = 3
}
```

```csharp
public class Contact
{
        public int Id { get; set; }
        public int CompanyId { get; set; }
        public string Name { get; set; }
        public string Phone { get; set; }
        public string PhoneMobile { get; set; }
        public string Email { get; set; }
        public string Comment { get; set; }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simutek.se/it/api/companyservice-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
