BokaMera.API.Host

<back to all web services

UpdateCustomerArticle

Requires Authentication
The following routes are available for this service:
PUT/customerarticle/{Id}Update an existing CustomerArticle.Update an existing CustomerArticle.
UpdateCustomerArticle Parameters:
NameParameterData TypeRequiredDescription
IdpathintYesThe customer article id
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
StatusIdbodyCustomerArticleStatusEnum?NoThe new status of the customer article
Pricebodydecimal?NoUpdated price
VATbodydecimal?NoUpdated VAT
CurrencyIdbodystringYesUpdated currency
CustomerArticleStatusEnum Enum:
NameValue
AwaitingPayment1
AwaitingPaymentFromProvider2
AwaitingPaymentNoTimeLimit3
Active4
Off5
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
DurationformintNo
ServicesformList<ArticleServiceRelation>Yes
ServiceIdsformList<int>Yes
PriceSignformstringYes
VATformdecimal?No
ValidDaysformintNo
SendNotificationformboolNo
NotificationEmailformstringYes
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 .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.

PUT /customerarticle/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	CompanyId: 00000000-0000-0000-0000-000000000000,
	StatusId: 0,
	Price: 0,
	VAT: 0,
	CurrencyId: 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,
		Duration: 0,
		Services: 
		[
			{
				Id: 0,
				ServiceId: 0,
				ArticleId: 0
			}
		],
		ServiceIds: 
		[
			0
		],
		PriceSign: String,
		VAT: 0,
		ValidDays: 0,
		SendNotification: False,
		NotificationEmail: String
	},
	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
		}
	}
}