| GET | /api/object/reference |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Saguna.Common.WebAPIModel.ServiceModels;
namespace Eros.Saguna.Common.WebAPIModel.ServiceModels
{
///<summary>
///Generate a unique reference number for the object.
///</summary>
[Api(Description="Generate a unique reference number for the object.")]
public partial class GenerateReferenceNumber
{
///<summary>
///Appliance to generate object reference for.
///</summary>
[ApiMember(DataType="Guid", Description="Appliance to generate object reference for.", IsRequired=true, Name="ApplianceId")]
public virtual Guid ApplianceId { get; set; }
}
[ApiResponse(Description="Returns the generated unique reference number for the specified object")]
public partial class GenerateReferenceNumberResponse
{
public virtual string Reference { get; set; }
public virtual ResponseStatus ResponseStatus { get; set; }
}
}
C# GenerateReferenceNumber DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/object/reference HTTP/1.1 Host: pfapi.pstpf.com.au Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Reference":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}