BokaMera.API.Host

<back to all web services

GetPricesAfterRebateCode

Requires Authentication
The following routes are available for this service:
POST/rebatecodes/pricesGet the new pricesGet the new prices after applying RebateCodes
GetPricesAfterRebateCode Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuidYes
ServiceIdbodyint?NoThe service you want to get the prices with rebates on
RebateCodeIdsbodyList<int>NoProvide this if you like to the prices with rebate code ids
RebateCodeSignsbodyList<string>NoProvide this if you like to the prices with rebate code signs instead of ids
DateFrombodyDateTimeYesProvide this if you like to calculate the prices with the provided datetime
RebateCodePriceResponse Parameters:
NameParameterData TypeRequiredDescription
RebateCodePricesformList<RebateCodePrice>No
ResponseStatusformResponseStatusNo
RebateCodePrice Parameters:
NameParameterData TypeRequiredDescription
PriceIdformint?NoPrice Id
PriceTextformstringNo
PriceBeforeRebateformdouble?No
Priceformdouble?No
VATformdecimal?No
AppliedCodesformList<AppliedRebateCodesResponse>No
AppliedRebateCodesResponse Parameters:
NameParameterData TypeRequiredDescription
RebateCodeSignformstringNo
RebateCodeValueformintNo
RebateCodeTypeformRebateCodeTypeResponseNo
RebateCodeIdformintNo
RebateAmountformdoubleNo
RebateCodeTypeResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
DescriptionformstringNo

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 /rebatecodes/prices HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ServiceId: 0,
	RebateCodeIds: 
	[
		0
	],
	RebateCodeSigns: 
	[
		String
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	RebateCodePrices: 
	[
		{
			PriceId: 0,
			PriceText: String,
			PriceBeforeRebate: 0,
			Price: 0,
			VAT: 0,
			AppliedCodes: 
			[
				{
					RebateCodeSign: String,
					RebateCodeValue: 0,
					RebateCodeType: 
					{
						Id: 0,
						Name: String,
						Description: String
					},
					RebateCodeId: 0,
					RebateAmount: 0
				}
			]
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}