10-29-2021, 02:22 PM | #1 |
Team Zissou
3065
Rep 10,197
Posts |
How To: Receive Automatic Stop Sale Status Check Notifications
Let me start off by saying this is completely unnecessary and totally overkill... but rather than manually refreshing Alex's awesome Recall Details Tool page - https://bmw-recall-tool.netlify.app/ (Thanks again Alex! I borrowed your defectCode descriptions). I went ahead and set up a monitor in Postman to hit the BMW API hourly and send me an email with the latest results of my stop sale status.
Follow these simple steps to set it up, and join me in obsessing over your car's status: Step 1. Sign up for Postman Go to www.postman.com and click "Sign up for free". Step 2. Create a Collection Once logged in, on the home screen under "Start with something new" click "Create New" and choose "Collection". Name it "My Recall Status". And expand the section: Step 3. Create a Request With your collection expanded, click "Add a request". Give it a name such as "Request Status". Make sure you're making a GET request, and add in this as your URL replacing the VIN with your VIN #: https://vehiclerecall.bmwgroup.com/a...in=yourvinhere. (the forum truncates it, so just look at the screenshot or click the link to get the full url) Click the "headers" tab and add: Authorization as the key, and: Basic TTJiNG1oMnR1Q0plZ1VmOkkyQlZJQ0dKS0dLR0xHV2dGS0dIRk ZLSGxaVE9F as the value. Click the "Tests" tab and add this bit of code: const jsonData = pm.response.json(); const defectCodes = [ { code: '0066540100', description: 'Programming control units (front radar sensor)' }, { code: '0066530100', description: 'Checking the installation of camera, retrofitting if necessary'}, { code: '0061070600', description: 'Program control units (BDC)'}, { code: '0065480300', description: 'Retrofitting the receiver audio module'}, { code: 'STOP021954', description: 'Fxx Gxx B47 B57 B58 S58 - Main Bearing Shell'}, { code: '0066570100', description: 'Checking the installation of the camera and TRSVC control unit, retrofitting if necessary'}, { code: '0012610500', description: 'Program control units (DME)'}, ]; for (const technicalCampaign of jsonData.data.technicalCampaigns) { let code = defectCodes.find(o => o.code === technicalCampaign.defectCode); pm.test(code.description, function () { pm.expect(technicalCampaign.vinStatus).eql('Closed '); }); } Step 4. Create a Monitor Click "Monitors" on the left, and add a new one. Name it "Recall Status" or something... In the settings for the monitor select "Recall Status". Select Hour Timer and Every Hour. Add in your email address and boom you're done! Make sure you set the monitor to run, and every hour you'll receive an email with the status of the stop sales you have. NOTE: Tests "Fail" until the vinStatus changes to "Closed". If a test has passed, that means that stop sale status is now Closed. Last edited by jpsimon; 10-29-2021 at 02:55 PM.. |
Appreciate
5
|
10-29-2021, 07:06 PM | #8 |
Team Zissou
3065
Rep 10,197
Posts |
Yeah your results will vary for sure, the API isn’t all encompassing apparently. Test out your vin using Alex’s tool first before doing any of my steps to see if you get any results
Last edited by jpsimon; 10-29-2021 at 07:41 PM.. |
Appreciate
0
|
10-31-2021, 12:22 PM | #9 | |
Captain
1188
Rep 826
Posts
Drives: 2022 M3 Competition
Join Date: Nov 2007
Location: milwaukee , WI
|
Quote:
Would like to be able to format the output of the test but doesn't look like you can. Something like [stop sale description] is [VIN status]
__________________
-- Owner of a 2022 M3 Competition AWD in Individual Voodoo Blue and Fiona Red leather |
|
Appreciate
0
|
10-31-2021, 05:00 PM | #12 |
///M ♥ Recycled Dinosaurs
3202
Rep 1,777
Posts
Drives: BMW M4, BMW X5 45e
Join Date: Jul 2021
Location: Seattle, WA
|
This is because there is an extra space in the authorization value in the original post that is there by mistake and needs to be removed:
Basic TTJiNG1oMnR1Q0plZ1VmOkkyQlZJQ0dKS0dLR0xHV2dGS0dIRk ZLSGxaVE9F should be: Basic TTJiNG1oMnR1Q0plZ1VmOkkyQlZJQ0dKS0dLR0xHV2dGS0dIRkZLSGxaVE9F
__________________
2022 BMW ///M4 Comp M xDrive (Enzian, Kyalami - insta | youtube | bp featured: Delivery + 963M + 2x Enzian!) | 2021 BMW X5 45e (Carbon Black Metallic, Ivory White)
BMW CCA LIFETIME MEMBER | Past cars: 2016 BMW 435i Gran Coupe (Carbon Black Metallic, Oyster White - Euro-delivery) |
Appreciate
0
|
10-31-2021, 07:30 PM | #13 |
Colonel
2940
Rep 2,538
Posts |
When do you officially know if you have a stop sale on you? Does it have to be at the port? I mean the final destination port? Or do you know when it gets loaded onto the ship?
|
Appreciate
0
|
10-31-2021, 09:18 PM | #14 | |
Captain
1188
Rep 826
Posts
Drives: 2022 M3 Competition
Join Date: Nov 2007
Location: milwaukee , WI
|
Quote:
==== const moment = require('moment'); let today= moment().format("MM/DD/YYYY, h:mm a"); const jsonData = pm.response.json(); const defectCodes = [ { code: '0066540100', description: 'Programming control units (front radar sensor)' }, { code: '0066530100', description: 'Checking the installation of camera, retrofitting if necessary'}, { code: '0061070600', description: 'Program control units (BDC)'}, { code: '0065480300', description: 'Retrofitting the receiver audio module'}, { code: 'STOP021954', description: 'Fxx Gxx B47 B57 B58 S58 - Main Bearing Shell'}, { code: '0066570100', description: 'Checking the installation of the camera and TRSVC control unit, retrofitting if necessary'}, { code: '0012610500', description: 'Program control units (DME)'}, ]; var Output=[]; for (const technicalCampaign of jsonData.data.technicalCampaigns) { let code = defectCodes.find(o => o.code === technicalCampaign.defectCode); let vinStats=technicalCampaign.vinStatus; let TheMsg=' '+today+' '+'======='+' '+code.description +' '+ ' - ' + vinStats+' '; Output.push(TheMsg) } JSON.stringify(Output) console.log(Output); // Set the contents of the slack message dynamically pm.environment.set('slackMsg',Output); ==== (edited this post after I fixed my script.) in a separate post function I send the SlackMsg to Slack using a environment variable for my web hook. probably could be done cleaner but I finally got it working. screen shot from my slack app next
__________________
-- Owner of a 2022 M3 Competition AWD in Individual Voodoo Blue and Fiona Red leather Last edited by Geektechlive; 10-31-2021 at 10:03 PM.. Reason: remove code formatting |
|
Appreciate
0
|
10-31-2021, 09:42 PM | #15 | |
///M ♥ Recycled Dinosaurs
3202
Rep 1,777
Posts
Drives: BMW M4, BMW X5 45e
Join Date: Jul 2021
Location: Seattle, WA
|
Quote:
After you take ownership, if something shows up, it'd just be a recall.
__________________
2022 BMW ///M4 Comp M xDrive (Enzian, Kyalami - insta | youtube | bp featured: Delivery + 963M + 2x Enzian!) | 2021 BMW X5 45e (Carbon Black Metallic, Ivory White)
BMW CCA LIFETIME MEMBER | Past cars: 2016 BMW 435i Gran Coupe (Carbon Black Metallic, Oyster White - Euro-delivery) |
|
Appreciate
0
|
11-01-2021, 09:50 AM | #16 | |
Team Zissou
3065
Rep 10,197
Posts |
Quote:
Nice! looks like you got it all sorted, I ended up doing this: for (const technicalCampaign of jsonData.data.technicalCampaigns) { let code = defectCodes.find(o => o.code === technicalCampaign.defectCode); let testName = code.description + ': ' + technicalCampaign.vinStatus.toUpperCase(); pm.test(testName, function () { pm.expect(technicalCampaign.vinStatus).eql('Closed '); }); } which output like so in slack (I changed the RAM / camera descriptions to be simple as well): 1. Radio Stop Sale: OPEN Request: Recall Status 2. Camera Stop Sale: OPEN Request: Recall Status |
|
Appreciate
1
Geektechlive1187.50 |
Post Reply |
Bookmarks |
|
|