New fields in EPOD Sync API
1. Damages API
- Extended Damage API with
stepfield taken from responsible Vehicle Photo object - Extended damages Webhooks with
stepfield taken from responsible Vehicle Photo object
Example of get damages list API response:
Request:
GET <base_url>/photos/<vehicle_photo_id>/damages/
Response:
{
"meta": {
"code": 200,
"request_id": "6b084923-...-6bd7f1a95830"
},
"data": [
{
"id": 1,
"code": "BR",
"notes": "Some note 1",
"step": "pickup"
},
{
"id": 2,
"code": "BR",
"notes": "Some note 2",
"step": "pickup"
}
],
"pagination": {
"previous": null,
"next": null
}
}
Example of get damage by ID API response:
Request:
GET <base_url>/damages/<damage_id>/
Response:
{
"meta": {
"code": 200,
"request_id": "6b084923-...-6bd7f1a95830"
},
"data": {
"id": 1,
"code": "BR",
"notes": "Some note 1",
"step": "delivery"
}
}
Example of damage.created webhook payload:
{
"data": {
"id": 1,
"code": "BR",
"notes": "Some note 1",
"step": "pickup",
"photo_id": 1
}
}
2. Orders API
- Extended Orders API with
driver_payfield
Example of get order by ID API response:
Request:
GET <base_url>/orders/<id>/
Response:
{
"meta": {
"code": 201,
"request_id": "3fe34e79-f2de...2514b2ee9aaa"
},
"data": {
"id": 1382732,
"carrier_id": 1,
"carrier_name": "Carrier",
"driver_id": null,
"number": "Test Order",
"instructions": "instructions here",
"buyer_number": "10000",
"price": "200.00",
"broker_fee": "20.00",
"status": "new",
"vehicles": [
{
"id": 444,
"make": "Chevrolet",
"model": "Camaro",
"year": 1950,
"color": "yellow",
"vin": "93773NF830JF83KD",
"type": "sedan",
"lot_number": "9384",
"is_inoperable": true,
"requires_enclosed_trailer": false,
"photos": [
{
"url": "https://superdispatch-staging.s3.amazonaws.com/static/msd/images/vehicles/10.png"
}
]
}
],
"pdf_bol_url": "https://staging.carrier.superdispatch.org/orders/pdf-bol/.../",
"inspection_type": "advanced",
"is_canceled": false,
"internal_notes": [],
"internal_load_id": "Load #1",
"parent_order_id": 1,
"driver_pay": "100.12",
"payment": {
"terms": "ach",
"notes": "payment notes",
"paid_at": null,
"invoice": {
"id": "5",
"sent_at": null
}
},
"trip": {
"id": 1,
"name": "Trip 1"
},
"customer": {
"name": "Test Shipper",
"address": "9525 Manchester Lane Bay Shore",
"city": "New York",
"state": "NY",
"zip": "90210",
"contact": {
"name": "Test Shipper",
"phone": "+12011111111",
"email": "testshipperemail@email.com",
"fax": null
}
},
"pickup": {
"scheduled_at": "2023-10-15T00:00:00-05:00",
"completed_at": null,
"notes": null,
"venue": {
"name": "Test Pickup",
"address": "pickup test address",
"city": "Kansas City",
"state": "MO",
"zip": "64030",
"contact": {
"name": "Joe",
"phone": "+12015550123",
"phone2": "+12015551234",
"email": "test.pickup_contact@email.com"
}
}
},
"delivery": {
"scheduled_at": "2023-10-20T00:00:00-05:00",
"completed_at": null,
"notes": null,
"venue": {
"name": "Test Delivery",
"address": "delivery test address",
"city": "Austin",
"state": "TX",
"zip": "10999",
"contact": {
"name": "Doe",
"phone": "+12015550123",
"phone2": "+12015550122",
"email": "test.delivery_contact@email.com"
}
}
}
}
}
Example of create order API request:
Request:
POST <base_url>/orders/
Body:
{
"driver_id": 1,
"number": "Test Order",
"price": 200,
"buyer_number": "10000",
"broker_fee": 20,
"instructions": "instructions here",
"inspection_type": "advanced",
"internal_load_id": "Load #1",
"driver_pay": 100.12,
"payment": {
"terms": "ach",
"notes": "payment notes",
"payment_method": "ach"
"payment_terms": "2_days"
},
"customer": {
"name": "Test Shipper",
"address": "9525 Manchester Lane Bay Shore",
"city": "New York",
"state": "NY",
"zip": "90210",
"contact": {
"name": "Test Shipper",
"phone": "+12011111111",
"email": "testshipperemail@email.com"
}
},
"pickup": {
"scheduled_at": "2023-10-15",
"note": "Some pickup notes",
"venue": {
"name": "Test Pickup",
"notes": "notes",
"address": "pickup test address",
"city": "Kansas City",
"state": "MO",
"zip": "64030",
"contact": {
"name": "Joe",
"phone": "+12015550123",
"phone2": "+12015551234",
"email": "test.pickup_contact@email.com"
}
}
},
"delivery": {
"scheduled_at": "2023-10-20",
"note": "Some delivery notes",
"venue": {
"name": "Test Delivery",
"address": "delivery test address",
"city": "Austin",
"state": "TX",
"zip": "10999",
"contact": {
"name": "Doe",
"phone": "+12015550123",
"phone2": "+12015550122",
"email": "test.delivery_contact@email.com"
}
}
},
"vehicles": [
{
"make": "Chevrolet",
"model": "Camaro",
"year": "1950",
"color": "yellow",
"vin": "93773NF830JF83KD",
"type": "sedan",
"lot_number": "9384",
"is_inoperable": true,
"requires_enclosed_trailer": false
},
...
]
}
Response:
{
"meta": {
"code": 201,
"request_id": "3fe34e79-f2de...2514b2ee9aaa"
},
"data": {
"id": 1382732,
"carrier_id": 1,
"carrier_name": "Carrier",
"driver_id": null,
"number": "Test Order",
"instructions": "instructions here",
"buyer_number": "10000",
"price": "200.00",
"broker_fee": "20.00",
"status": "new",
"vehicles": [
{
"id": 444,
"make": "Chevrolet",
"model": "Camaro",
"year": 1950,
"color": "yellow",
"vin": "93773NF830JF83KD",
"type": "sedan",
"lot_number": "9384",
"is_inoperable": true,
"requires_enclosed_trailer": false,
"photos": [
{
"url": "https://superdispatch-staging.s3.amazonaws.com/static/msd/images/vehicles/10.png"
}
]
}
],
"pdf_bol_url": "https://staging.carrier.superdispatch.org/orders/pdf-bol/.../",
"inspection_type": "advanced",
"is_canceled": false,
"internal_notes": [],
"internal_load_id": "Load #1",
"parent_order_id": 1,
"driver_pay": "100.12",
"payment": {
"terms": "ach",
"notes": "payment notes",
"paid_at": null,
"invoice": {
"id": "5",
"sent_at": null
}
},
"trip": {
"id": 1,
"name": "Trip 1"
},
"customer": {
"name": "Test Shipper",
"address": "9525 Manchester Lane Bay Shore",
"city": "New York",
"state": "NY",
"zip": "90210",
"contact": {
"name": "Test Shipper",
"phone": "+12011111111",
"email": "testshipperemail@email.com",
"fax": null
}
},
"pickup": {
"scheduled_at": "2023-10-15T00:00:00-05:00",
"completed_at": null,
"notes": null,
"venue": {
"name": "Test Pickup",
"address": "pickup test address",
"city": "Kansas City",
"state": "MO",
"zip": "64030",
"contact": {
"name": "Joe",
"phone": "+12015550123",
"phone2": "+12015551234",
"email": "test.pickup_contact@email.com"
}
}
},
"delivery": {
"scheduled_at": "2023-10-20T00:00:00-05:00",
"completed_at": null,
"notes": null,
"venue": {
"name": "Test Delivery",
"address": "delivery test address",
"city": "Austin",
"state": "TX",
"zip": "10999",
"contact": {
"name": "Doe",
"phone": "+12015550123",
"phone2": "+12015550122",
"email": "test.delivery_contact@email.com"
}
}
}
}
}