BokaMera.API.Host

<back to all web services

UpdateArticle

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/articles/{Id}Updates articleUpdates article for the currently logged in user
UpdateArticle Parameters:
NameParameterData TypeRequiredDescription
IdqueryintYes
CompanyIdbodyGuid?No
NamebodystringYes
ArticleTypeIdbodyint?No
DescriptionbodystringYes
ImageUrlbodyUriYes
Activebodybool?No
AmountbodyintNo
PricebodydoubleNoThe updated price of the article.
CurrencyIdbodystringYesThe payment currency id
VATbodydecimal?NoThe price VAT in percent
ServiceIdsqueryint[]YesQuery for specific services.
ArticleResponse Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidNo
IdformintNo
NameformstringYes
ArticleTypeIdformintNo
DescriptionformstringYes
ImageUrlformstringYes
ActiveformboolNo
AmountformintNo
PriceformdoubleNo
CurrencyIdformstringYes
UpdatedDateformDateTimeNo
CreatedDateformDateTimeNo
ServicesformList<ArticleServiceRelation>Yes
ServiceIdsformList<int>Yes
PriceSignformstringYes
VATformdecimal?No
ArticleServiceRelation Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidYes
IdformintNo
ServiceIdformintYes
ArticleIdformintYes

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.

PUT /articles/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Id":0,"CompanyId":"00000000-0000-0000-0000-000000000000","Name":"String","ArticleTypeId":0,"Description":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","VAT":0,"ServiceIds":[0]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Id":0,"Name":"String","ArticleTypeId":0,"Description":"String","ImageUrl":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","Services":[{"Id":0,"ServiceId":0,"ArticleId":0}],"ServiceIds":[0],"PriceSign":"String","VAT":0}