BokaMera.API.Host

<back to all web services

UpdateEaccountingCustomer

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/eaccounting/customersUpdate E-Accounting Customer

export class InvoiceAddress
{
    public CorporateIdentityNumber: string;
    public InvoiceAddress1: string;
    public InvoiceAddress2: string;
    public InvoiceCity: string;
    public InvoicePostalCode: string;
    public InvoiceCountryCode: string;

    public constructor(init?: Partial<InvoiceAddress>) { (Object as any).assign(this, init); }
}

export class EAccountingTermsOfPayment
{
    public Id: string;
    public Name: string;
    public NameEnglish: string;
    public NumberOfDays: number;
    public TermsOfPaymentTypeId: number;
    public TermsOfPaymentTypeText: string;
    public AvailableForSales: boolean;
    public AvailableForPurchase: boolean;

    public constructor(init?: Partial<EAccountingTermsOfPayment>) { (Object as any).assign(this, init); }
}

export class CustomerLabel
{
    public Id: string;
    public Name: string;
    public Description: string;

    public constructor(init?: Partial<CustomerLabel>) { (Object as any).assign(this, init); }
}

export class DirectDebitCustomerSettings
{
    public MandateId: string;
    public MandateType: number;
    public SequenceType: number;
    public SigningDate: string;
    public EndDate: string;
    public LatestDirectDebit: string;

    public constructor(init?: Partial<DirectDebitCustomerSettings>) { (Object as any).assign(this, init); }
}

export class CreateEAccountingCustomer extends InvoiceAddress
{
    public CustomerNumber: string;
    public ContactPersonEmail: string;
    public ContactPersonMobile: string;
    public ContactPersonName: string;
    public ContactPersonPhone: string;
    public CurrencyCode: string;
    public GLN: string;
    public EmailAddress: string;
    public EmailAddressOrder: string;
    public EmailAddressQuote: string;
    public DeliveryCustomerName: string;
    public DeliveryAddress1: string;
    public DeliveryAddress2: string;
    public DeliveryCity: string;
    public DeliveryCountryCode: string;
    public DeliveryPostalCode: string;
    public DeliveryMethodId: string;
    public DeliveryTermId: string;
    public PayToAccountId: string;
    public Name: string;
    public Note: string;
    public ReverseChargeOnConstructionServices: boolean;
    public WebshopCustomerNumber?: number;
    public MobilePhone: string;
    public Telephone: string;
    public TermsOfPaymentId: string;
    public EAccountingTermsOfPayment: EAccountingTermsOfPayment;
    public VatNumber: string;
    public WwwAddress: string;
    public LastInvoiceDate: string;
    public IsPrivatePerson: boolean;
    public IsNorthernIreland: boolean;
    public DiscountPercentage: number;
    public ChangedUtc?: string;
    public IsActive: boolean;
    public ForceBookkeepVat: boolean;
    public EdiGlnNumber: string;
    public SalesDocumentLanguage: string;
    public ElectronicAddress: string;
    public ElectronicReference: string;
    public EdiServiceDelivererId: string;
    public AutoInvoiceActivationEmailSentDate?: string;
    public AutoInvoiceRegistrationRequestSentDate?: string;
    public EmailAddresses: string[];
    public CustomerLabels: CustomerLabel[];
    public MessageThreads: string[];
    public Notes: string[];
    public IsFutureInvoiceDateAllowed: boolean;
    public DeliveryBasedVat: boolean;
    public SalesPriceListId: string;
    public Iban: string;
    public DirectDebitCustomerSettings: DirectDebitCustomerSettings;
    public DiscountAgreementId: string;
    public UnpaidInvoicesAmount: number;

    public constructor(init?: Partial<CreateEAccountingCustomer>) { super(init); (Object as any).assign(this, init); }
}

export class EAccountingCustomerResponse extends CreateEAccountingCustomer
{
    public Id: string;

    public constructor(init?: Partial<EAccountingCustomerResponse>) { super(init); (Object as any).assign(this, init); }
}

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
export class UpdateEaccountingCustomer implements ICompany
{
    /** @description Customer Id in e-accounting. */
    // @ApiMember(Description="Customer Id in e-accounting.", IsRequired=true)
    public Id: string;

    /** @description  */
    // @ApiMember(Description="")
    public InvoiceCity: string;

    /** @description Max length: 10 characters */
    // @ApiMember(Description="Max length: 10 characters")
    public InvoicePostalCode: string;

    /** @description Max length: 50 characters */
    // @ApiMember(Description="Max length: 50 characters")
    public Name: string;

    /** @description  */
    // @ApiMember(Description="")
    public TermsOfPaymentId: string;

    /** @description  */
    // @ApiMember(Description="")
    public IsPrivatePerson: boolean;

    /** @description  */
    // @ApiMember(Description="")
    public IsActive: boolean;

    /** @description  */
    // @ApiMember(Description="")
    public Telephone: string;

    /** @description  */
    // @ApiMember(Description="")
    public EmailAddress: string;

    /** @description  */
    // @ApiMember(Description="")
    public MobilePhone: string;

    /** @description The company id, if empty will use the company id for the user you are logged in with. */
    // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    public CompanyId?: string;

    public constructor(init?: Partial<UpdateEaccountingCustomer>) { (Object as any).assign(this, init); }
}

TypeScript UpdateEaccountingCustomer DTOs

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

HTTP + CSV

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

PUT /eaccounting/customers HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Id":"String","InvoiceCity":"String","InvoicePostalCode":"String","Name":"String","TermsOfPaymentId":"String","IsPrivatePerson":false,"IsActive":false,"Telephone":"String","EmailAddress":"String","MobilePhone":"String","CompanyId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":"String","CustomerNumber":"String","ContactPersonEmail":"String","ContactPersonMobile":"String","ContactPersonName":"String","ContactPersonPhone":"String","CurrencyCode":"String","GLN":"String","EmailAddress":"String","EmailAddressOrder":"String","EmailAddressQuote":"String","DeliveryCustomerName":"String","DeliveryAddress1":"String","DeliveryAddress2":"String","DeliveryCity":"String","DeliveryCountryCode":"String","DeliveryPostalCode":"String","DeliveryMethodId":"String","DeliveryTermId":"String","PayToAccountId":"String","Name":"String","Note":"String","ReverseChargeOnConstructionServices":false,"WebshopCustomerNumber":0,"MobilePhone":"String","Telephone":"String","TermsOfPaymentId":"String","EAccountingTermsOfPayment":{"Id":"String","Name":"String","NameEnglish":"String","NumberOfDays":0,"TermsOfPaymentTypeId":0,"TermsOfPaymentTypeText":"String","AvailableForSales":false,"AvailableForPurchase":false},"VatNumber":"String","WwwAddress":"String","LastInvoiceDate":"String","IsPrivatePerson":false,"IsNorthernIreland":false,"DiscountPercentage":0,"ChangedUtc":"0001-01-01T00:00:00","IsActive":false,"ForceBookkeepVat":false,"EdiGlnNumber":"String","SalesDocumentLanguage":"String","ElectronicAddress":"String","ElectronicReference":"String","EdiServiceDelivererId":"String","AutoInvoiceActivationEmailSentDate":"0001-01-01T00:00:00","AutoInvoiceRegistrationRequestSentDate":"0001-01-01T00:00:00","EmailAddresses":["String"],"CustomerLabels":[{"Id":"String","Name":"String","Description":"String"}],"MessageThreads":["String"],"Notes":["String"],"IsFutureInvoiceDateAllowed":false,"DeliveryBasedVat":false,"SalesPriceListId":"String","Iban":"String","DirectDebitCustomerSettings":{"MandateId":"String","MandateType":0,"SequenceType":0},"DiscountAgreementId":"String","UnpaidInvoicesAmount":0,"CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"}