BokaMera.API.Host

<back to all web services

CreateCustomerArticleFromArticle

The following routes are available for this service:
POST/customerarticle/fromarticleCreate CustomerArticle.Create CustomerArticle.
FromArticleBase Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuid?No
ArticleIdformintYesArticle ID for the rebate code
CustomerformCustomerToHandleYesCustomer information
InvoiceAddressformInvoiceAddressToHandleYesIf you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile.
CustomerBase Parameters:
NameParameterData TypeRequiredDescription
CustomerIdformGuid?No
FirstnameformstringYes
LastnameformstringYes
EmailformstringYes
PhoneformstringYes
SubscribedToNewsletterformboolNo
PersonalIdentityNumberformstringYes
InvoiceAddressToHandle Parameters:
NameParameterData TypeRequiredDescription
CorporateIdentityNumberformstringYes
InvoiceAddress1formstringYes
InvoiceAddress2formstringYes
InvoiceCityformstringYes
InvoicePostalCodeformstringYes
InvoiceCountryCodeformstringYes
CustomerArticleResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CompanyIdformGuidNo
ArticleIdformint?No
Priceformdecimal?No
VATformdecimal?No
CurrencyIdformstringYes
StatusIdformintNo
StatusNameformstringYes
CustomerIdformGuid?No
CreatedDateformDateTimeNo
UpdatedDateformDateTimeNo
ArticleformArticleResponseYes
CustomerformCustomerArticleCustomerResponseYes
CompanyformCustomerArticleCompanyResponseYes
PaymentLogformList<PaymentLogResponse>Yes
ResponseStatusformResponseStatusYes
ArticleResponse Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidNo
IdformintNo
NameformstringYes
ArticleTypeIdformintNo
DescriptionformstringYes
ImageUrlformstringYes
ActiveformboolNo
AmountformintNo
PriceformdoubleNo
CurrencyIdformstringYes
SortOrderformintNo
UpdatedDateformDateTimeNo
CreatedDateformDateTimeNo
ServicesformList<ArticleServiceRelation>Yes
ServiceIdsformList<int>Yes
PriceSignformstringYes
VATformdecimal?No
ArticleServiceRelation Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidYes
IdformintNo
ServiceIdformintYes
ArticleIdformintYes
CustomerArticleCustomerResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
FirstnameformstringYes
LastnameformstringYes
EmailformstringYes
PhoneformstringYes
CustomerArticleCompanyResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringYes
LogoTypeformstringYes
EmailformstringYes
PhoneformstringYes
CityformstringYes
Street1formstringYes
ZipCodeformstringYes
CountryIdformstringYes
PaymentLogResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
Amountformdouble?No
AmountCreditedformdouble?No
CurrencyIdformstringYes
CommentsformstringYes
CreatedformDateTimeNo
UpdatedformDateTimeNo

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

HTTP + OTHER

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

POST /customerarticle/fromarticle HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","ArticleId":0,"Customer":{"CustomerId":"00000000-0000-0000-0000-000000000000","Firstname":"String","Lastname":"String","Email":"String","Phone":"String","SubscribedToNewsletter":false,"PersonalIdentityNumber":"String"},"InvoiceAddress":{"CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Id":0,"ArticleId":0,"Price":0,"VAT":0,"CurrencyId":"String","StatusId":0,"StatusName":"String","CustomerId":"00000000-0000-0000-0000-000000000000","Article":{"Id":0,"Name":"String","ArticleTypeId":0,"Description":"String","ImageUrl":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","SortOrder":0,"Services":[{"Id":0,"ServiceId":0,"ArticleId":0}],"ServiceIds":[0],"PriceSign":"String","VAT":0},"Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String"},"Company":{"Name":"String","LogoType":"String","Email":"String","Phone":"String","City":"String","Street1":"String","ZipCode":"String","CountryId":"String"},"PaymentLog":[{"Id":0,"Amount":0,"AmountCredited":0,"CurrencyId":"String","Comments":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}