Referencia de la API
1 min
Send Transactions
Send a list of dealer's transactions.
POST
/dealer/{dealer_no}/retail-transactions
const axios = require('axios');
let data = JSON.stringify({
"transactions": [
{
"header": {
"transaction_number": "0019E37",
"transaction_close_date": "2023-04-01",
"transaction_source": "In-Store",
"cancel_flag": false,
"transaction_uuid": "ED0EB53A-73E0-4891-90DB-57944E159ED8",
"customers": [
{
"customer_id": "005784",
"customer_hash": "b25d0a94ad6707d04957ca22400aeae92ba7a4497e53f25f1991d7323d0864e7",
"recipient": "Customer",
"city": "Sherbrooke",
"state_province": "QC",
"country": "CAN"
}
]
},
"parts": [
{
"part_description": "Lightweight Performance Seat",
"part_number": "860202221",
"quantity": 1,
"quantity_uom": "PC",
"is_special_order": false,
"total_customer_price": 517.49,
"dealer_price": 449.99,
"dealer_cost": 399.99,
"msrp": 449.99,
"currency": "CAD",
"additional_costs": [
{
"type": "Tax",
"description": "Sales Tax",
"applicable_amount": 449.99,
"rate": 0.15,
"amount": 67.5
}
],
"associated_job_number": "14725"
},
{
"part_description": "Deep Snow Soft Knee Pads",
"part_number": "860202702",
"quantity": 1,
"quantity_uom": "PC",
"is_special_order": false,
"total_customer_price": 120.74,
"dealer_price": 104.99,
"dealer_cost": 79.99,
"msrp": 99.99,
"currency": "CAD",
"additional_costs": [
{
"type": "Tax",
"description": "Sales Tax",
"applicable_amount": 104.99,
"rate": 0.15,
"amount": 15.75
}
],
"associated_job_number": "14725"
},
{
"part_description": "NON-BRP-PARTS",
"part_number": "NON-BRP-PARTS",
"quantity": 2,
"quantity_uom": "PC",
"is_special_order": false,
"total_customer_price": 15,
"currency": "CAD",
"additional_costs": []
}
],
"units": [
{
"vin": "2BPSCDRB0AA000001",
"odometer_reading": 1.2,
"hours": 1.5,
"class_code": "New",
"sales_lead_id": "xxxx-xxxx",
"total_customer_price": 10194.35,
"dealer_price": 16249,
"dealer_cost": 15000,
"msrp": 16249,
"currency": "CAD",
"trade_ins": [
{
"manufacturer": "BRP",
"vin": "2BPSTCEA0AA000001",
"odometer_reading": 16180,
"hours": 1024.7,
"price": -8000
}
],
"financed_amount": 10994.21,
"financed_rate": 0.0499,
"financed_term_duration": 60
}
],
"jobs": [
{
"job_number": "14725",
"description": "Accessory Installation",
"job_code": "PAI",
"is_warranty_job": false,
"total_customer_job_price": 0,
"currency": "CAD",
"time_cards": [
{
"labour_worked_hours": 0.5,
"labour_billed_hours": 0,
"labour_rate": 65,
"technician_party_id": "TECH00123"
}
],
"vin": "2BPSCDRB0AA000001",
"odometer_reading": 1.2,
"hours": 1.5
},
{
"job_number": "14726",
"job_code": "PDI",
"description": "Pre-delivery Inspection",
"is_warranty_job": false,
"total_customer_job_price": 0,
"currency": "CAD",
"time_cards": [
{
"labour_worked_hours": 0.5,
"labour_billed_hours": 0,
"labour_rate": 65,
"technician_party_id": "TECH00101"
},
{
"labour_worked_hours": 1,
"labour_billed_hours": 0,
"labour_rate": 50,
"technician_party_id": "TECH00113"
}
],
"vin": "2BPSCDRB0AA000001",
"odometer_reading": 1.2,
"hours": 1.5
},
{
"job_number": "14727",
"job_code": "OTH",
"description": "Special Ultra High Altitude Tuning",
"is_warranty_job": false,
"total_customer_job_price": 146.63,
"currency": "CAD",
"time_cards": [
{
"labour_worked_hours": 1.5,
"labour_billed_hours": 1.5,
"labour_rate": 85,
"technician_party_id": "TECH00123"
}
],
"vin": "2BPSCDRB0AA000001",
"odometer_reading": 1.5,
"hours": 1.7
}
]
}
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://qa-cloud-api.brp.com/dcp/v4/dealer/0000690078/transactions',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer REPLACE_ME'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});