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
namespace BokaMera.API.ServiceModel.Db

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type BaseModel() = 
        class end

    [<AllowNullLiteral>]
    type ArticleServiceRelation() = 
        inherit BaseModel()
        [<Required>]
        member val CompanyId:Guid = new Guid() with get,set

        member val Id:Int32 = new Int32() with get,set
        [<Required>]
        member val ServiceId:Int32 = new Int32() with get,set

        [<Required>]
        member val ArticleId:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type ArticleResponse() = 
        member val CompanyId:Guid = new Guid() with get,set
        member val Id:Int32 = new Int32() with get,set
        member val Name:String = null with get,set
        member val ArticleTypeId:Int32 = new Int32() with get,set
        member val Description:String = null with get,set
        member val ImageUrl:String = null with get,set
        member val Active:Boolean = new Boolean() with get,set
        member val Amount:Int32 = new Int32() with get,set
        member val Price:Double = new Double() with get,set
        member val CurrencyId:String = null with get,set
        member val UpdatedDate:DateTime = new DateTime() with get,set
        member val CreatedDate:DateTime = new DateTime() with get,set
        member val Services:ResizeArray<ArticleServiceRelation> = new ResizeArray<ArticleServiceRelation>() with get,set
        member val ServiceIds:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val PriceSign:String = null with get,set

    [<AllowNullLiteral>]
    type UpdateArticle() = 
        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="", IsRequired=true, ParameterType="query")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val Name:String = null with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val ArticleTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val Description:String = null with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val ImageUrl:Uri = null with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val Active:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="")>]
        member val Amount:Int32 = new Int32() with get,set

        ///<summary>
        ///.
        ///</summary>
        [<ApiMember(Description=".")>]
        member val Price:Double = new Double() with get,set

        ///<summary>
        ///The payment currency id
        ///</summary>
        [<ApiMember(Description="The payment currency id")>]
        member val CurrencyId:String = null with get,set

        ///<summary>
        ///Query for specific services.
        ///</summary>
        [<ApiMember(Description="Query for specific services.", ParameterType="query")>]
        member val ServiceIds:Int32[] = [||] with get,set

F# UpdateArticle DTOs

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

HTTP + JSON

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: application/json
Content-Type: application/json
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","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"}