> For the complete documentation index, see [llms.txt](https://docs.simutek.se/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.simutek.se/it/api/companyservice-api.md).

# 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; }
}
```
