Deals
Create a new Deal
Deals
Create a new Deal
POST
/
deals
curl --request POST \
--url https://commerce.driv.ly/api/deals \
--header 'Content-Type: application/json' \
--data '{
"id": "deal_5ksj49dkvdl2",
"dealer": {
"location": {
"id": "loc_8dj39dksm2d9",
"zip": "90210",
"city": {
"name": "Anytown",
"state": {
"code": "CA"
}
},
"line2": "Suite 100",
"line1": "456 Dealership Blvd",
"latitude": 34.0522,
"longitude": -118.2437
}
},
"vehicle": {
"id": "veh_3k12j9qksdf0",
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "Off-Road Package",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"customer": {
"id": "cus_9kd39fkj4l5d",
"addresses": [
{
"id": "adr_9fdk39dkc9d3",
"city": {
"name": "New City",
"state": {
"code": "CA"
}
},
"zip": "90212",
"line2": "Apt 202",
"line1": "987 New Address Blvd"
}
],
"phoneNumbers": [
"555-456-7890"
]
},
"facilitator": {
"id": "fac_6dj39dk3kdl3",
"name": "AutoFacilitators Inc.",
"location": {
"id": "loc_2kj49d1msod2",
"zip": "90310",
"city": {
"name": "Uptown",
"state": {
"code": "CA"
}
},
"line2": "Floor 3",
"line1": "789 Facilitator Road"
}
},
"maximumBidPrice": 50000,
"currentBidPrice": 45000,
"minimumBidPrice": 30000,
"coBuyerOrCoSellerCustomer": {
"id": "cus_k3j5s9qj3w0d",
"addresses": [
{
"id": "adr_4kj6s9qj3w0d",
"city": {
"name": "Anytown",
"state": {
"code": "NY"
}
},
"zip": "10001",
"line2": "",
"line1": "123 Customer St"
}
],
"phoneNumbers": [
"555-987-6543"
]
}
}'
{
"data": {
"id": "deal_5ksj49dkvdl2",
"dealer": {
"location": {
"id": "loc_8dj39dksm2d9",
"zip": "90210",
"city": {
"name": "Anytown",
"state": {
"code": "CA"
}
},
"line2": "Suite 100",
"line1": "456 Dealership Blvd",
"latitude": 34.0522,
"longitude": -118.2437
}
},
"vehicle": {
"id": "veh_3k12j9qksdf0",
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "Off-Road Package",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"customer": {
"id": "cus_9kd39fkj4l5d",
"addresses": [
{
"id": "adr_9fdk39dkc9d3",
"city": {
"name": "New City",
"state": {
"code": "CA"
}
},
"zip": "90212",
"line2": "Apt 202",
"line1": "987 New Address Blvd"
}
],
"phoneNumbers": [
"555-456-7890"
]
},
"facilitator": {
"id": "fac_6dj39dk3kdl3",
"name": "AutoFacilitators Inc.",
"location": {
"id": "loc_2kj49d1msod2",
"zip": "90310",
"city": {
"name": "Uptown",
"state": {
"code": "CA"
}
},
"line2": "Floor 3",
"line1": "789 Facilitator Road"
}
},
"maximumBidPrice": 50000,
"currentBidPrice": 45000,
"minimumBidPrice": 30000,
"coBuyerOrCoSellerCustomer": {
"id": "cus_k3j5s9qj3w0d",
"addresses": [
{
"id": "adr_4kj6s9qj3w0d",
"city": {
"name": "Anytown",
"state": {
"code": "NY"
}
},
"zip": "10001",
"line2": "",
"line1": "123 Customer St"
}
],
"phoneNumbers": [
"555-987-6543"
]
}
},
"success": true
}
Query Parameters
The number of levels of related objects to include in the response
Body
application/json
Deal buys/sells Vehicle
Deal is made with Customer
Deal is uniquely identified by id
Deal has Maximum Bid Price
Deal sells from Dealer
Deal has Current Bid Price
Deal has Minimum Bid Price
Deal is facilitated by Facilitator
Deal has CoBuyer Or CoSeller Customer
Response
200
application/json
Deal Created
Deal is uniquely identified by id
Deal buys/sells Vehicle
Deal is made with Customer
Deal has Maximum Bid Price
Deal sells from Dealer
Deal has Current Bid Price
Deal has Minimum Bid Price
Deal is facilitated by Facilitator
Deal has CoBuyer Or CoSeller Customer
curl --request POST \
--url https://commerce.driv.ly/api/deals \
--header 'Content-Type: application/json' \
--data '{
"id": "deal_5ksj49dkvdl2",
"dealer": {
"location": {
"id": "loc_8dj39dksm2d9",
"zip": "90210",
"city": {
"name": "Anytown",
"state": {
"code": "CA"
}
},
"line2": "Suite 100",
"line1": "456 Dealership Blvd",
"latitude": 34.0522,
"longitude": -118.2437
}
},
"vehicle": {
"id": "veh_3k12j9qksdf0",
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "Off-Road Package",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"customer": {
"id": "cus_9kd39fkj4l5d",
"addresses": [
{
"id": "adr_9fdk39dkc9d3",
"city": {
"name": "New City",
"state": {
"code": "CA"
}
},
"zip": "90212",
"line2": "Apt 202",
"line1": "987 New Address Blvd"
}
],
"phoneNumbers": [
"555-456-7890"
]
},
"facilitator": {
"id": "fac_6dj39dk3kdl3",
"name": "AutoFacilitators Inc.",
"location": {
"id": "loc_2kj49d1msod2",
"zip": "90310",
"city": {
"name": "Uptown",
"state": {
"code": "CA"
}
},
"line2": "Floor 3",
"line1": "789 Facilitator Road"
}
},
"maximumBidPrice": 50000,
"currentBidPrice": 45000,
"minimumBidPrice": 30000,
"coBuyerOrCoSellerCustomer": {
"id": "cus_k3j5s9qj3w0d",
"addresses": [
{
"id": "adr_4kj6s9qj3w0d",
"city": {
"name": "Anytown",
"state": {
"code": "NY"
}
},
"zip": "10001",
"line2": "",
"line1": "123 Customer St"
}
],
"phoneNumbers": [
"555-987-6543"
]
}
}'
{
"data": {
"id": "deal_5ksj49dkvdl2",
"dealer": {
"location": {
"id": "loc_8dj39dksm2d9",
"zip": "90210",
"city": {
"name": "Anytown",
"state": {
"code": "CA"
}
},
"line2": "Suite 100",
"line1": "456 Dealership Blvd",
"latitude": 34.0522,
"longitude": -118.2437
}
},
"vehicle": {
"id": "veh_3k12j9qksdf0",
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "Off-Road Package",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"customer": {
"id": "cus_9kd39fkj4l5d",
"addresses": [
{
"id": "adr_9fdk39dkc9d3",
"city": {
"name": "New City",
"state": {
"code": "CA"
}
},
"zip": "90212",
"line2": "Apt 202",
"line1": "987 New Address Blvd"
}
],
"phoneNumbers": [
"555-456-7890"
]
},
"facilitator": {
"id": "fac_6dj39dk3kdl3",
"name": "AutoFacilitators Inc.",
"location": {
"id": "loc_2kj49d1msod2",
"zip": "90310",
"city": {
"name": "Uptown",
"state": {
"code": "CA"
}
},
"line2": "Floor 3",
"line1": "789 Facilitator Road"
}
},
"maximumBidPrice": 50000,
"currentBidPrice": 45000,
"minimumBidPrice": 30000,
"coBuyerOrCoSellerCustomer": {
"id": "cus_k3j5s9qj3w0d",
"addresses": [
{
"id": "adr_4kj6s9qj3w0d",
"city": {
"name": "Anytown",
"state": {
"code": "NY"
}
},
"zip": "10001",
"line2": "",
"line1": "123 Customer St"
}
],
"phoneNumbers": [
"555-987-6543"
]
}
},
"success": true
}