| Required roles: | Administrator, Administrator, Administrator | Requires any of the roles: | Worker, Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/Locations/{Id} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Locations |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class Location
Public Overridable Property Id As Guid
Public Overridable Property ClientId As Guid
Public Overridable Property Name As String
Public Overridable Property Address1 As String
Public Overridable Property Address2 As String
Public Overridable Property City As String
Public Overridable Property State As String
Public Overridable Property Zip As String
Public Overridable Property Phone As String
Public Overridable Property Fax As String
Public Overridable Property TimeZone As String
Public Overridable Property Active As Boolean
Public Overridable Property EntDate As Date
Public Overridable Property ModDate As Date
End Class
Public Partial Class LocationsRequest
Public Overridable Property Id As Guid
Public Overridable Property Locations As List(Of Location) = New List(Of Location)
End Class
Public Partial Class LocationsResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Locations As List(Of Location) = New List(Of Location)
End Class
End Namespace
End Namespace
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/Locations/{Id} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Id: 00000000000000000000000000000000,
Locations:
[
{
Id: 00000000000000000000000000000000,
ClientId: 00000000000000000000000000000000,
Name: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Phone: String,
Fax: String,
TimeZone: String,
Active: False,
EntDate: 0001-01-01,
ModDate: 0001-01-01
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Locations:
[
{
Id: 00000000000000000000000000000000,
ClientId: 00000000000000000000000000000000,
Name: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Phone: String,
Fax: String,
TimeZone: String,
Active: False,
EntDate: 0001-01-01,
ModDate: 0001-01-01
}
]
}