How can I get the eBay API to return list of current eBay Promotional Offers for my seller account? - ebay-api

If you are an eBay seller and have enabled the Seller Hub dashboard, you could scroll down and see a section named "Promotional Offers". For example, mine may say:
Promotional offers
Additional Fixed Price Free Insertions in Select Categories
Additional fixed price insertions in select categories.
Start:Jan 1, 2023 at 12:00am PST End:End:Feb 1, 2023 at 12:00am PST
Used/Left: 6, 49994 ebay.com
Premium Store Subscription – 10,000 Fixed Price Listings
Pay no insertion fees for 10,000 listings
Start:Jan 1, 2023 at 12:00am PST End:End:Feb 1, 2023 at 12:00am PST
Used/Left: 48, 9952 ebay.com
List auction-style FREE, up to 500 in select categories
Pay no insertion fee for 500 auction-style listings in collectible and fashion categories.
Start:Jan 1, 2023 at 12:00am PST End:End:Feb 1, 2023 at 12:00am PST
Used/Left: 0, 500 ebay.com
I have been unable to find any API call in the eBay developer docs yet which specifically can pull these promotional offers programmatically for me.
Is there any way to do this? I'd hate to resort to some lame scraping-my-ebay-dashboard solution for this...

Related

match event windows (in month) using sas sql

I have two files, one with event date, the other one is the security prices I need to match the month with event month 0, -1 (previous month), and +1 (the month after event month). So e.g., one observation has event date 1/1/2010, I have the daily bond prices from 1/1/2009 to 1/20/2010, but I need to match January,2010 to December 2009 prices and February 2010. I have the following codes to do that,
PROC SQL;
CREATE TABLE test AS
select *
FROM bondprice as a, sdc as b
where b.Participant_CUSIP=a.cusip
& INTCK('MONTH',b.Alliance_Date,a.time)>=-1
& INTCK('MONTH',b.Alliance_Date,a.time)<=1 ;
QUIT;
DATA test1;
SET test;
BY deal_number CUSIP code time;
IF first.code THEN price1=price;
IF first.code THEN day1=time;
IF last.code THEN price0=price;
IF last.code THEN day0=time;
RUN;
clearly this observation should be only matched in 1-month Jan 2010 (0,0) and 2-month Dec 2009 to Jan 2010 (-1,0), because it does not have 3-month Feb 2010's prices. However, if using my codes above, it will yield as a valid obs who has 3-month price since it fell into the range of >=-1 and <=1.
So the first part of code is not accurate (the >= and <= range): it yields any prices that falls into December 2009 to Feb 2010, this is wrong because of two situations. First, if the bond prices stops in between Dec 2009 and Jan 2010, it will be counting as a valid 2-month and 3-month observations. Second, if the bond prices begins in between Jan 2010 and Feb 2010, it will be counting as a valid 3-month observation. Both of these two situation will yield invalid observations, since the first situation do not have Feb 2010 prices but still counts as 2-month and 3-month, and the second situation do not have either Dec 2009 or Jan 2010 prices, but still counts as 3-month.
Will someone help me with this? How can I modify the code so that the 3-month window and 2-month window contains the relative months?
I hope I describe the problem clearly. Please let me know if anything is unclear.
I've uploaded an example to this problem here.
https://www.dropbox.com/s/hx9ahst7nts4k0q/ex1.xlsx?dl=0

MS Access 2010: combining consecutive date ranges

At work, I've been designing an MS Access query to manipulate client service agreements.
The requirement I'm stuck on is that if a client has had multiple consecutive agreements (i.e. the start date of one is the day after the end date of the previous one), they're counted as one (so the earliest start date is used).
The relevant fields in the table are:
Agr_ID (Agreement ID), number
Per_ID (Person ID), text
Agr_Type (Agreement Type), text
Start_Date, date
End_Date, date
For example:
103, A1234, Homecare, 20th Oct 2013, 05th Nov 2013
110, A1234, OT Equip, 06th Nov 2013, 09th Dec 2013
114, A1234, Homecare, 10th Dec 2013, 19th Jan 2014
125, A1234, Homecare, 20th Jan 2014, 15th Jun 2014
147, A1234, Homecare, 16th Jun 2014, null
The last three would be considered a single agreement (spanning the date range 10th Dec 2013 to present) but the top two wouldn't (103 isn't consecutive with 114, 110 is of a different type). The latest agreement is to be used as the base, as subsequent queries will only keep those combined agreements whose end date is later than [Prompt] and which have been open for at least 365 days. So unfortunately, grabbing min(Start_Date) won't do.
So the desired result for that extract would be:
103, A1234, Homecare, 20th Oct 2013, 05th Nov 2013
110, A1234, OT Equip, 06th Nov 2013, 09th Dec 2013
147, A1234, Homecare, 10th Dec 2013, null
I'm thinking several derived tables / subqueries may be needed, to list the agreements for each client, then iteratively work backwards through the resulting table to find the earliest qualifying start date. The only consolation to the amount of recursion involved is that the table I'm basing the query on was created via a MakeTable query that filtered the raw Agreements table, so only agreements with an end date greater than [Prompt] - 365 days or null are included, and the Agreements table this is running off is under 10,000 records.

MS Access grouping query spanning start and end dates

I would like to get a running tally of how many widgets were/are rented at any one time, by month, by year. Data is held in an MS Access 2003 db;
Table name: rent_table
Fields:
rentid
startdate
enddate
rentfee
rentcost
bookingfee
Something like; Count number of rentid's that fall between month/year, then group them?
e.g. if a widget was rented from 5th Jan 2014 to 8th April 2014 it would appear as a count in Jan, Feb, Mar and April tally's.
Many thanks.
EDIT
More details (sorry);
Access db is fronted by classic ASP.
If possible I don't want to create any new tables.
No input is required in order to run the report.
There are around 350-400 widgets that could be rented at any one time.
Each widget is rented exclusively.
Report output example;
Month | Year | NumRented
Jan 2014 86
Feb 2014 113
...
Can a query pick up dates within dates? So literally do a count of the table where date >Dec 31st 2013 AND <1st Feb 2014 (to grab a count for all of January 2014) and would that include the example of the rent starting on the 5th Jan? So I could just do twelve counts for each year?
create a calendar table, e.g.
table = cal_yyyymm with one column dt_yyyymm as numeric field
populate the table with ... say 5 or 10 years of data
201401 201402 201403 ... 60 or 120 rows, a small table
make a sql
Select
dt_yyyymm,
count(*) as cnt
From cal_yyyymm
Left Join rent_table
On format(startdate,"yyyymm") >= dt_yyyymm
And dt_yyyymm >= format(enddate,"yyyymm")
think about the complications in the data -- --
widget was rented from 5th Jan 2014 to 8th Jan 2014
and again rented from 11th Jan 2014 to 21st Jan 2014
does this count at 1 or 2 in the month?
if it is 1, then the sql gets more complicated because
the rent_table first needs to have its dates converted
to yyyymm format, and second needs to be de-duped on rentid,
and third then joined to cal_ On the dates...

Lookup a value from a range of dates in excel

Please help.
We have two tables. A list of accounts and the other is a change log. I need to add a new column in table 1 where the value is the amount in table 2 for the correct account and correct validity period.
ex.
table 1:
account# beginning period ending period
1 January 1, 2012 January 31, 2012
2 January 12, 2012 February 12, 2012
table 2:
account # amount valid period beg valid period end
1 10 january 1, 2009 december 5, 2010
1 20 december 6, 2010 june 1, 2011
1 30 june 2, 2011 december 1, 2012
2 13 january 15, 2011 december 15, 2011
2 20 december 16, 2011 february 20, 2012
Thanks.
Although it is a bit complex requirement it could be done with built-in functions (although it can look a bit obscure :-) ). Specifically I mean function SUMIFS.
It has several parameters.
The first one is an area with values to be summed. It is B8:B12 in this example.
The second is an area whith values to be checked with some condition. It is A8:A12.
The third is a criterion to be applied for area from second parameter. It is (inter alia) account #.
So the formula says: sum all values from rows in B8:B12 where account # (A8:A12) is equal to desired account # (e.g. A3).
Ok, it is not all, you need specify the time range. It would be a bit clunky because you must check if two time period are overlapping (it would be easier to check if one date is in specified period).
But it could be done because SUMIFS can take another pairs of criteria range and criterion. But it cannot be used for OR condition, so you had to combine more SUMIFS.
Nice article about overlapping ranges is e.g. http://chandoo.org/wp/2010/06/01/date-overlap-formulas/
BTW: you have to format cells in B2:C3 and C8:D12 as a date to be able to compare them.

Performing MTD/YTD calcs over multiple calendars in analysis services

I have the following situation in my cube:
Shop A uses calendar Cal1. Their sales month starts Jan 5th.
Shop B uses calendar Cal2. Their sales month starts Jan 10th.
Shop C...etc
Shop calendars can not simply be represented as offsets of a main calendar. They have different working days, public holidays etc.
I need to produce a daily (reporting services) report with the actual calendar date as a parameter. The list of shops is also a multi select parameter. If a user selects the 15th of Jan, I need to show the combined MTD sales for all shops selected in the parameters. So that would mean the first 10 days of sales for shop A and the first 5 days of sales for shop B etc.
Any ideas how I can make this work? I'll also need to provide YTD figures in the same manner.
I am implementing multiple calendars using a bridging table between my date and calendar dimensions. It is the technique described here: http://duncansutcliffe.wordpress.com/2010/06/11/a-better-date-dimension/
I can not hard code the calendars as there is a requirement to possibly add more in the future without modifying the schema.
I am not sure I understand you sales data start days, but if I do then the solution is to make an extra dimension as a "reporting calendar" as a point of harmony between the actual calendars
Each shop has a known offset to the reporting calendar, so for shop A it's 5 days, for shop B it's 10 days etc
When you add fact data you also need to calculate a reporting date using the offset. So for Shop A 5 Jan is actually 1 Jan etc
When reporting, the user selects a date on the reporting calendar, and facts are selected based on that
e.g. if the user selected reporting calendar 15th Jan, it would only select actual dates 1 to 15 Jan and reporting calendar up to 15 and only Jan
Data selected would be Shop A 5 to 15, Shop B 10 to 15
1 to 4 Jan for Shop A and 1 to 9 for Shop B would be in Dec of the reporting calendar, and not included because of the filter of reporting calendar Jan