NAV

<back to all web services

CallCenter1099Get

The following routes are available for this service:
GET/call-center/1099/{AccountNumber}/{Year}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TransactionDetail:
    date: Optional[datetime.datetime] = None
    transaction_number: Optional[str] = None
    description: Optional[str] = None
    value1099: Optional[Decimal] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CallCenter1099GetResponse:
    account_number: Optional[Decimal] = None
    year: Optional[int] = None
    merchandise_sales: Optional[Decimal] = None
    total_actual_withholding_to_date: Optional[Decimal] = None
    total_future_withholding_to_date: Optional[Decimal] = None
    total_earnings: Optional[Decimal] = None
    transaction_details: Optional[List[TransactionDetail]] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CallCenter1099Get(IGet):
    account_number: Optional[Decimal] = None
    year: Optional[int] = None

Python CallCenter1099Get 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.

GET /call-center/1099/{AccountNumber}/{Year} HTTP/1.1 
Host: extensions.avon.ca 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	accountNumber: 0,
	year: 0,
	merchandiseSales: 0,
	totalActualWithholdingToDate: 0,
	totalFutureWithholdingToDate: 0,
	totalEarnings: 0,
	transactionDetails: 
	[
		{
			date: 0001-01-01T00:00:00,
			transactionNumber: String,
			description: String,
			value1099: 0
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}