| POST,PUT | /v1/projectlocationsitedetail | ||
|---|---|---|---|
| DELETE | /v1/projectlocationsitedetail/{ProjectLocationSiteDetailID} |
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 ProjectLocation
{
public virtual int ProjectLocationID { get; set; }
public virtual int ProjectID { get; set; }
public virtual string Name { get; set; }
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string Zip { get; set; }
public virtual decimal? Latitude { get; set; }
public virtual decimal? Longitude { get; set; }
public virtual decimal? TotalArea { get; set; }
public virtual string AreaUnit { get; set; }
public virtual string AccessInstructions { get; set; }
public virtual bool IsPrimary { get; set; }
public virtual int DisplayOrder { get; set; }
public virtual bool Active { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime? CreatedAt { get; set; }
public virtual DateTime? UpdatedAt { get; set; }
public virtual List<ProjectLocationArea> Areas { get; set; } = [];
public virtual List<ProjectLocationEquipment> Equipment { get; set; } = [];
public virtual List<ProjectLocationSiteDetail> SiteDetails { get; set; } = [];
public virtual List<ProjectLocationAttachment> Attachments { get; set; } = [];
}
public partial class ProjectLocationArea
{
public virtual int ProjectLocationAreaID { get; set; }
public virtual int ProjectLocationID { get; set; }
public virtual string Name { get; set; }
public virtual decimal? Measurement { get; set; }
public virtual string MeasurementUnit { get; set; }
public virtual string Notes { get; set; }
public virtual int DisplayOrder { get; set; }
public virtual bool Active { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime? CreatedAt { get; set; }
public virtual DateTime? UpdatedAt { get; set; }
}
public partial class ProjectLocationAttachment
{
public virtual int ProjectLocationAttachmentID { get; set; }
public virtual int ProjectLocationID { get; set; }
public virtual int? ProjectLocationAreaID { get; set; }
public virtual string Kind { get; set; }
public virtual string DocTitle { get; set; }
public virtual string FileName { get; set; }
public virtual string Url { get; set; }
public virtual string MimeType { get; set; }
public virtual DateTime? UploadDate { get; set; }
public virtual string UploadedBy { get; set; }
public virtual bool Active { get; set; }
}
public partial class ProjectLocationEquipment
{
public virtual int ProjectLocationEquipmentID { get; set; }
public virtual int ProjectLocationID { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual string Manufacturer { get; set; }
public virtual string Model { get; set; }
public virtual string SerialNumber { get; set; }
public virtual string AssetTag { get; set; }
public virtual string Notes { get; set; }
public virtual bool Active { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime? CreatedAt { get; set; }
public virtual DateTime? UpdatedAt { get; set; }
}
public partial class ProjectLocationResponse
{
public virtual List<ProjectLocation> Locations { get; set; } = [];
public virtual List<ProjectLocationArea> Areas { get; set; } = [];
public virtual List<ProjectLocationEquipment> Equipment { get; set; } = [];
public virtual List<ProjectLocationSiteDetail> SiteDetails { get; set; } = [];
public virtual List<ProjectLocationAttachment> Attachments { get; set; } = [];
public virtual ProjectLocationSiteDetail SiteDetail { get; set; }
public virtual ResponseStatus ResponseStatus { get; set; }
}
public partial class ProjectLocationSiteDetail
{
public virtual int ProjectLocationSiteDetailID { get; set; }
public virtual int ProjectLocationID { get; set; }
public virtual string DetailType { get; set; }
public virtual string Label { get; set; }
public virtual string Value { get; set; }
public virtual bool IsSensitive { get; set; }
public virtual int EncVersion { get; set; }
public virtual bool HasValue { get; set; }
public virtual string Notes { get; set; }
public virtual int DisplayOrder { get; set; }
public virtual bool Active { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime? CreatedAt { get; set; }
public virtual DateTime? UpdatedAt { get; set; }
}
public partial class ProjectLocationSiteDetailRequest
{
public virtual int ProjectLocationSiteDetailID { get; set; }
public virtual List<ProjectLocationSiteDetail> SiteDetails { get; set; } = [];
}
}
C# ProjectLocationSiteDetailRequest DTOs
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.
POST /v1/projectlocationsitedetail HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectLocationSiteDetailID: 0,
SiteDetails:
[
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Locations:
[
{
ProjectLocationID: 0,
ProjectID: 0,
Name: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Latitude: 0,
Longitude: 0,
TotalArea: 0,
AreaUnit: String,
AccessInstructions: String,
IsPrimary: False,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
Areas:
[
{
ProjectLocationAreaID: 0,
ProjectLocationID: 0,
Name: String,
Measurement: 0,
MeasurementUnit: String,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Equipment:
[
{
ProjectLocationEquipmentID: 0,
ProjectLocationID: 0,
Name: String,
Description: String,
Manufacturer: String,
Model: String,
SerialNumber: String,
AssetTag: String,
Notes: String,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
SiteDetails:
[
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Attachments:
[
{
ProjectLocationAttachmentID: 0,
ProjectLocationID: 0,
ProjectLocationAreaID: 0,
Kind: String,
DocTitle: String,
FileName: String,
Url: String,
MimeType: String,
UploadDate: 0001-01-01,
UploadedBy: String,
Active: False
}
]
}
],
Areas:
[
{
ProjectLocationAreaID: 0,
ProjectLocationID: 0,
Name: String,
Measurement: 0,
MeasurementUnit: String,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Equipment:
[
{
ProjectLocationEquipmentID: 0,
ProjectLocationID: 0,
Name: String,
Description: String,
Manufacturer: String,
Model: String,
SerialNumber: String,
AssetTag: String,
Notes: String,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
SiteDetails:
[
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Attachments:
[
{
ProjectLocationAttachmentID: 0,
ProjectLocationID: 0,
ProjectLocationAreaID: 0,
Kind: String,
DocTitle: String,
FileName: String,
Url: String,
MimeType: String,
UploadDate: 0001-01-01,
UploadedBy: String,
Active: False
}
],
SiteDetail:
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}