DigiOffice Gateway Web Services

<back to all web services

IDB_4PSBC_Import_Bedrijf

Import bedrijf record vanuit 4PS

Requires Authentication
The following routes are available for this service:
POST/api/4PSBC/ImportBedrijf
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Header:
    # @ApiMember(Description="Inhoud van het bericht")
    contains: Optional[str] = None
    """
    Inhoud van het bericht
    """


    # @ApiMember(Description="Datum aanmaak bericht")
    date: Optional[str] = None
    """
    Datum aanmaak bericht
    """


    # @ApiMember(Description="ID voor het bericht")
    message_i_d: Optional[str] = None
    """
    ID voor het bericht
    """


    # @ApiMember(Description="Verzender van het bericht")
    sender: Optional[str] = None
    """
    Verzender van het bericht
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Response_Company:
    # @ApiMember(Description="Reponse status (Ok/Error)", IsRequired=true)
    status: Optional[str] = None
    """
    Reponse status (Ok/Error)
    """


    # @ApiMember(Description="Errors summary")
    errors: Optional[str] = None
    """
    Errors summary
    """


    # @ApiMember(Description="ID of the company in DigiOffice", IsRequired=true)
    digi_office_company_i_d: Optional[str] = None
    """
    ID of the company in DigiOffice
    """


    # @ApiMember(Description="GlobalID (digiOfficeId) of the company in DigiOffice", IsRequired=true)
    digi_office_global_i_d: Optional[str] = None
    """
    GlobalID (digiOfficeId) of the company in DigiOffice
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IDB_4PSBC_Response_Bedrijf:
    # @ApiMember(Description="Header of the response", IsRequired=true)
    header: Optional[Header] = None
    """
    Header of the response
    """


    # @ApiMember(Description="Response body", IsRequired=true)
    response: Optional[Response_Company] = None
    """
    Response body
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Data_Company:
    visit_address: Optional[str] = None
    visit_address2: Optional[str] = None
    vat_registration_no: Optional[str] = None
    vendor_no: Optional[str] = None
    customer_no: Optional[str] = None
    e_mail: Optional[str] = None
    company_name4ps: Optional[str] = None
    system_id: Optional[str] = None
    digi_office_id: Optional[str] = None
    coc_registration_no: Optional[str] = None
    coc_location_no: Optional[str] = None
    coc_city: Optional[str] = None
    visit_address_country_region_id: Optional[str] = None
    country_region_id: Optional[str] = None
    country_region_code_id: Optional[str] = None
    mobile_phone_no: Optional[str] = None
    name: Optional[str] = None
    name2: Optional[str] = None
    visit_address_city: Optional[str] = None
    city: Optional[str] = None
    address: Optional[str] = None
    visit_address_post_code: Optional[str] = None
    post_code: Optional[str] = None
    phone_no: Optional[str] = None
    phone_no2: Optional[str] = None
    home_page: Optional[str] = None
    no: Optional[str] = None
    company_id: Optional[str] = None
    blocked: Optional[bool] = None
    name_abbreviation: Optional[str] = None


# @Api(Description="Import bedrijf record vanuit 4PS")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IDB_4PSBC_Import_Bedrijf:
    """
    Import bedrijf record vanuit 4PS
    """

    # @ApiMember(Description="Message header", IsRequired=true)
    header: Optional[Header] = None
    """
    Message header
    """


    # @ApiMember(Description="Message data", IsRequired=true)
    data: Optional[Data_Company] = None
    """
    Message data
    """

Python IDB_4PSBC_Import_Bedrijf DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/4PSBC/ImportBedrijf HTTP/1.1 
Host: test-dogw.klokgroep.nl 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Header: 
	{
		Contains: String,
		Date: String,
		MessageID: String,
		Sender: String
	},
	Data: 
	{
		visitAddress: String,
		visitAddress2: String,
		vatRegistrationNo: String,
		vendorNo: String,
		customerNo: String,
		eMail: String,
		companyName4ps: String,
		systemId: 00000000-0000-0000-0000-000000000000,
		digiOfficeId: 00000000-0000-0000-0000-000000000000,
		cocRegistrationNo: String,
		cocLocationNo: String,
		cocCity: String,
		visitAddressCountryRegionId: String,
		countryRegionId: String,
		countryRegionCodeId: String,
		mobilePhoneNo: String,
		name: String,
		name2: String,
		visitAddressCity: String,
		city: String,
		address: String,
		visitAddressPostCode: String,
		postCode: String,
		phoneNo: String,
		phoneNo2: String,
		homePage: String,
		no: String,
		companyId: 00000000-0000-0000-0000-000000000000,
		blocked: False,
		nameAbbreviation: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Header: 
	{
		Contains: String,
		Date: String,
		MessageID: String,
		Sender: String
	},
	Response: 
	{
		Status: String,
		Errors: String,
		DigiOfficeCompanyID: String
	}
}