Trendsic Platform Service

<back to all web services

MaterialUsageRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/Material/{MaterialID}/usage
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;

namespace CRM.AgencyPlatform.API.Internal
{
    public partial class MaterialUsageEntry
    {
        public virtual string Scope { get; set; }
        public virtual int ProjectID { get; set; }
        public virtual string ProjectName { get; set; }
        public virtual int JobID { get; set; }
        public virtual string JobName { get; set; }
        public virtual int Quantity { get; set; }
        public virtual string UsageDate { get; set; }
    }

    public partial class MaterialUsageRequest
    {
        public virtual int MaterialID { get; set; }
    }

    public partial class MaterialUsageResponse
    {
        public virtual ResponseStatus ResponseStatus { get; set; }
        public virtual List<MaterialUsageEntry> Usage { get; set; } = [];
    }

}

C# MaterialUsageRequest 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.

GET /v1/Material/{MaterialID}/usage HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Usage":[{"Scope":"String","ProjectID":0,"ProjectName":"String","JobID":0,"JobName":"String","Quantity":0,"UsageDate":"String"}]}