| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /articles/{Id} | Updates article | Updates article for the currently logged in user |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | query | int | Yes | |
| CompanyId | body | Guid? | No | |
| Name | body | string | Yes | |
| ArticleTypeId | body | int? | No | |
| Description | body | string | Yes | |
| ImageUrl | body | Uri | Yes | |
| Active | body | bool? | No | |
| Amount | body | int | No | |
| Price | body | double | No | The updated price of the article. |
| CurrencyId | body | string | Yes | The payment currency id |
| VAT | body | decimal? | No | The price VAT in percent |
| ServiceIds | query | int[] | Yes | Query for specific services. |
| 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 | |
| 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 |
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.
PUT /articles/{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,
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/jsv
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
}