| POST | /customerarticle/fromarticle | Create CustomerArticle. | Create CustomerArticle. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | form | Guid? | No | |
| ArticleId | form | int | Yes | Article ID for the rebate code |
| Customer | form | CustomerToHandle | Yes | Customer information |
| InvoiceAddress | form | InvoiceAddressToHandle | Yes | If 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. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CustomerId | form | Guid? | No | |
| Firstname | form | string | Yes | |
| Lastname | form | string | Yes | |
| form | string | Yes | ||
| Phone | form | string | Yes | |
| SubscribedToNewsletter | form | bool | No | |
| PersonalIdentityNumber | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| CompanyId | form | Guid | No | |
| ArticleId | form | int? | No | |
| Price | form | decimal? | No | |
| VAT | form | decimal? | No | |
| CurrencyId | form | string | Yes | |
| StatusId | form | int | No | |
| StatusName | form | string | Yes | |
| CustomerId | form | Guid? | No | |
| CreatedDate | form | DateTime | No | |
| UpdatedDate | form | DateTime | No | |
| Article | form | ArticleResponse | Yes | |
| Customer | form | CustomerArticleCustomerResponse | Yes | |
| Company | form | CustomerArticleCompanyResponse | Yes | |
| PaymentLog | form | List<PaymentLogResponse> | Yes | |
| ResponseStatus | form | ResponseStatus | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | form | Guid | No | |
| Id | form | int | No | |
| Name | form | string | Yes | |
| ArticleTypeId | form | int | No | |
| Description | form | string | Yes | |
| ImageUrl | form | string | Yes | |
| Active | form | bool | No | |
| Amount | form | int | No | |
| Price | form | double | No | |
| CurrencyId | form | string | Yes | |
| SortOrder | form | int | No | |
| UpdatedDate | form | DateTime | No | |
| CreatedDate | form | DateTime | No | |
| Services | form | List<ArticleServiceRelation> | Yes | |
| ServiceIds | form | List<int> | Yes | |
| PriceSign | form | string | Yes | |
| VAT | form | decimal? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | form | Guid | Yes | |
| Id | form | int | No | |
| ServiceId | form | int | Yes | |
| ArticleId | form | int | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Firstname | form | string | Yes | |
| Lastname | form | string | Yes | |
| form | string | Yes | ||
| Phone | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | Yes | |
| LogoType | form | string | Yes | |
| form | string | Yes | ||
| Phone | form | string | Yes | |
| City | form | string | Yes | |
| Street1 | form | string | Yes | |
| ZipCode | form | string | Yes | |
| CountryId | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Amount | form | double? | No | |
| AmountCredited | form | double? | No | |
| CurrencyId | form | string | Yes | |
| Comments | form | string | Yes | |
| Created | form | DateTime | No | |
| Updated | form | DateTime | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
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/jsv
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
}
}
}