Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
POST | /articles | Add new article | Add article to the company for the currently logged in user |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | body | Guid? | No | |
Name | body | string | Yes | |
ArticleTypeId | body | int | Yes | |
Description | body | string | Yes | |
ImageUrl | body | Uri | No | |
Active | body | bool | Yes | |
Amount | body | int | Yes | |
Price | body | double | Yes | . |
CurrencyId | body | string | Yes | The payment currency id |
ServiceIds | query | int[] | No | Query for specific services. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | form | Guid | No | |
Id | form | int | No | |
Name | form | string | No | |
ArticleTypeId | form | int | No | |
Description | form | string | No | |
ImageUrl | form | string | No | |
Active | form | bool | No | |
Amount | form | int | No | |
Price | form | double | No | |
CurrencyId | form | string | No | |
UpdatedDate | form | DateTime | No | |
CreatedDate | form | DateTime | No | |
Services | form | List<ArticleServiceRelation> | No | |
ServiceIds | form | List<int> | No | |
PriceSign | form | string | 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /articles HTTP/1.1
Host: api.bokamera.se
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Name":"String","ArticleTypeId":0,"Description":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","ServiceIds":[0]}
HTTP/1.1 200 OK Content-Type: application/json 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"}