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

export class BaseModel
{

    public constructor(init?: Partial<BaseModel>) { (Object as any).assign(this, init); }
}

export class ArticleServiceRelation extends BaseModel
{
    // @Required()
    public CompanyId: string;

    public Id: number;
    // @Required()
    public ServiceId: number;

    // @Required()
    public ArticleId: number;

    public constructor(init?: Partial<ArticleServiceRelation>) { super(init); (Object as any).assign(this, init); }
}

export class ArticleResponse
{
    public CompanyId: string;
    public Id: number;
    public Name: string;
    public ArticleTypeId: number;
    public Description: string;
    public ImageUrl: string;
    public Active: boolean;
    public Amount: number;
    public Price: number;
    public CurrencyId: string;
    public UpdatedDate: string;
    public CreatedDate: string;
    public Services: ArticleServiceRelation[];
    public ServiceIds: number[];
    public PriceSign: string;

    public constructor(init?: Partial<ArticleResponse>) { (Object as any).assign(this, init); }
}

export class UpdateArticle implements ICompany
{
    /** @description  */
    // @ApiMember(Description="", IsRequired=true, ParameterType="query")
    public Id: number;

    /** @description  */
    // @ApiMember(Description="")
    public CompanyId?: string;

    /** @description  */
    // @ApiMember(Description="")
    public Name: string;

    /** @description  */
    // @ApiMember(Description="")
    public ArticleTypeId?: number;

    /** @description  */
    // @ApiMember(Description="")
    public Description: string;

    /** @description  */
    // @ApiMember(Description="")
    public ImageUrl: string;

    /** @description  */
    // @ApiMember(Description="")
    public Active?: boolean;

    /** @description  */
    // @ApiMember(Description="")
    public Amount: number;

    /** @description . */
    // @ApiMember(Description=".")
    public Price: number;

    /** @description The payment currency id */
    // @ApiMember(Description="The payment currency id")
    public CurrencyId: string;

    /** @description Query for specific services. */
    // @ApiMember(Description="Query for specific services.", ParameterType="query")
    public ServiceIds: number[];

    public constructor(init?: Partial<UpdateArticle>) { (Object as any).assign(this, init); }
}

TypeScript 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"}