Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
POST | /Locations |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TicketUserServices.ServiceModel;
using TicketUserServices.ServiceModel.Types;
namespace TicketUserServices.ServiceModel
{
public partial class LocationsResult
{
public LocationsResult()
{
Items = new List<Location>{};
}
public virtual List<Location> Items { get; set; }
public virtual int StatusCode { get; set; }
public virtual string Message { get; set; }
}
public partial class LocationsSearchRequest
{
public virtual string Name { get; set; }
public virtual string CountryCode { get; set; }
}
}
namespace TicketUserServices.ServiceModel.Types
{
public partial class Location
{
public virtual int ID { get; set; }
public virtual string Name { get; set; }
public virtual decimal Latitude { get; set; }
public virtual decimal Longitude { get; set; }
public virtual string AddressName { get; set; }
public virtual string AddressLine { get; set; }
public virtual string Zip { get; set; }
public virtual string City { get; set; }
public virtual string County { get; set; }
public virtual string StateCode { get; set; }
public virtual string StateName { get; set; }
public virtual string CountryCode { get; set; }
public virtual string CountryName { get; set; }
public virtual string TimeZone { get; set; }
}
}
C# LocationsSearchRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Locations HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"name":"String","countryCode":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"items":[{"id":0,"name":"String","latitude":0,"longitude":0,"addressName":"String","addressLine":"String","zip":"String","city":"String","county":"String","stateCode":"String","stateName":"String","countryCode":"String","countryName":"String","timeZone":"String"}],"statusCode":0,"message":"String"}