Trendsic Platform Service

<back to all web services

CoverageSelfSwapRespondRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/coverage/self/swaprespond

export class CoverageSelfEligibility
{
    public Tone: string;
    public Text: string;
    public CanClaim: boolean;
    public ClaimLabel: string;

    public constructor(init?: Partial<CoverageSelfEligibility>) { (Object as any).assign(this, init); }
}

export class CoverageSelfMatrixRow
{
    public Name: string;
    public Note: string;
    public Tone: string;

    public constructor(init?: Partial<CoverageSelfMatrixRow>) { (Object as any).assign(this, init); }
}

export class CoverageSelfCard
{
    public CoverageGapId: number;
    public Kind: string;
    public Status: string;
    public ShiftDay: string;
    public ShiftWindow: string;
    public ShiftStartUtc?: string;
    public Site: string;
    public RoleNeeded: string;
    public ExpiryLabel: string;
    public PosterName: string;
    public EligibleCount: number;
    public IneligibleCount: number;
    public MyEligibility: CoverageSelfEligibility;
    public Matrix: CoverageSelfMatrixRow[] = [];
    public SwapState: string;
    public SwapFromName: string;
    public SwapTargetName: string;
    public OfferShift: string;
    public WantShift: string;
    public ConflictOk: boolean;
    public ConflictLabel: string;
    public CanRespond: boolean;

    public constructor(init?: Partial<CoverageSelfCard>) { (Object as any).assign(this, init); }
}

export class CoverageSelfCardResponse
{
    public ResponseStatus: ResponseStatus;
    public Card: CoverageSelfCard;

    public constructor(init?: Partial<CoverageSelfCardResponse>) { (Object as any).assign(this, init); }
}

export class CoverageSelfSwapRespondRequest
{
    public CoverageGapId: number;
    public Action: string;

    public constructor(init?: Partial<CoverageSelfSwapRespondRequest>) { (Object as any).assign(this, init); }
}

TypeScript CoverageSelfSwapRespondRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/coverage/self/swaprespond HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CoverageGapId: 0,
	Action: String
}
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
		}
	},
	Card: 
	{
		CoverageGapId: 0,
		Kind: String,
		Status: String,
		ShiftDay: String,
		ShiftWindow: String,
		ShiftStartUtc: 0001-01-01,
		Site: String,
		RoleNeeded: String,
		ExpiryLabel: String,
		PosterName: String,
		EligibleCount: 0,
		IneligibleCount: 0,
		MyEligibility: 
		{
			Tone: String,
			Text: String,
			CanClaim: False,
			ClaimLabel: String
		},
		Matrix: 
		[
			{
				Name: String,
				Note: String,
				Tone: String
			}
		],
		SwapState: String,
		SwapFromName: String,
		SwapTargetName: String,
		OfferShift: String,
		WantShift: String,
		ConflictOk: False,
		ConflictLabel: String,
		CanRespond: False
	}
}