Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Fundamentally submitting a payment for an impound vehicle consists of 4 steps:

  1. Finding the correct vehicle

  2. finding its fees/total to the user

  3. Creating the receipt

  4. Creating the payment

Finding the correct vehicle is done by calling the /impound/lookup endpoint with a payload containing either

  1. Partial or full VIN

  2. License plate number & License state

  3. Date + vehicle details

You’ll also need to send along your region code, and the statuses you’re interested in. In this case the status you’re interested in is “STORED”. Here is an example looking for vehicle in the test region of IMP-TS, in the stored status, with a particular license and license state

 Lookup by license and license state code

curl --location 'https://staging-api.autoreturn.net/api-web/api/impound/lookup' \
--header 'Content-Type: application/json' \
--data '{
"regionCode": "IMP-TS",
"impoundStatus": [
"STORED"
],
"vehicleLookupData": {
"license": "KK00001",
"licenseStateCode": "NC"
},
"start": 0,
"limit": 50
}'

Here is an example of looking up by VIN

 Lookup by VIN

curl --location 'https://staging-api.autoreturn.net/api-web/api/impound/lookup' \
--header 'Content-Type: application/json' \
--data '{
"regionCode": "IMP-TS",
"impoundStatus": [
"STORED"
],
"vehicleLookupData": {
"VIN": "2P4GP2539YR506044"
},
"start": 0,
"limit": 50
}'

Looking up by vehicle details is more complicated, since you need our list of makes, models and colors.

You can get these lists by calling /api-web/api/refdata/{regionCode}/colors
/api-web/api/refdata/{regionCode}/makes

and once you have the make, you can request all models for that make using

/api-web/api/refdata/{regionCode}/models/by-make/{makeCode}

Once the user has selected a value for these they should select a date, then you can send those to us, for example.

 Lookup by vehicle details

curl --location 'https://staging-api.autoreturn.net/api-web/api/impound/lookup' \
--header 'Content-Type: application/json' \
--data '{
"regionCode": "IMP-TS",
"impoundStatus": [
"STORED"
],
"vehicleLookupData": {
"makeId": 148,
"modelId": 2307
},
"dateFrom": "2023-01-09T00:00:00",
"dateTo": "2023-01-10T00:00:00",
"start": 0,
"limit": 50
}
'

Note that the limit is very important here, as you could end up returning many vehicles if you allow the user to select something very broad, like all toyotas towed in January.

 Response example
[
    {
        "id": 1067632,
        "status": "STORED",
        "version": 6,
        "region": {
            "id": 8000,
            "privateRegion": false,
            "standardRegion": true,
            "managedRegion": true,
            "code": "IMP-TS",
            "name": "Impound Test Region",
            "state": "CA",
            "center": {
                "lat": 37.766,
                "lon": -122.428
            },
            "zoneId": "America/Los_Angeles",
            "serverTimeOffset": 0,
            "topRight": {
                "lat": 37.832,
                "lon": -122.355
            },
            "bottomLeft": {
                "lat": 37.668,
                "lon": -122.529
            }
        },
        "make": {
            "id": 148,
            "code": "AIR",
            "name": "AIR",
            "active": true,
            "motorcycle": false
        },
        "model": {
            "id": 2307,
            "makeId": 148,
            "name": "CITY BIKE DA DONNA",
            "code": "CITY BIKE DA DONNA",
            "active": true,
            "motorcycle": false
        },
        "color": {
            "id": 1,
            "name": "BLACK",
            "code": "BLCK",
            "active": true
        },
        "body": {
            "id": 65155,
            "name": "ALL TERAIN VEHICLE",
            "code": "ATV",
            "active": true,
            "motorcycle": false,
            "sortOrder": 29
        },
        "vehicleYear": 0,
        "keyStatus": "KEY_MADE",
        "odometer": 0,
        "vin": "2P4GP2539YR506044",
        "noVin": false,
        "vinNotVisible": false,
        "noPlate": false,
        "license": "KK00001",
        "licenseState": {
            "code": "NC",
            "name": "NORTH CAROLINA",
            "active": true
        },
        "storage": [
            {
                "timeFrom": "2023-01-09T04:29:09.232",
                "lot": {
                    "code": "ART-IMP-TS",
                    "latitude": 29.763576,
                    "longitude": -95.356544,
                    "companyCode": "ART-IMP-TS",
                    "addr1": "123 Test Zone Lot",
                    "city": "San Francisco",
                    "zip": "94105",
                    "phone": "9999999999",
                    "twoStepRelease": false,
                    "state": {
                        "id": "CA",
                        "code": "CA",
                        "name": "CALIFORNIA",
                        "country": "USA",
                        "displayName": "CA - CALIFORNIA"
                    },
                    "id": 1369,
                    "name": "ART-IMP-TS Test Lot"
                },
                "id": 50408
            }
        ],
        "account": {
            "id": 305,
            "code": "TSTACC",
            "name": "TSTACC",
            "active": true,
            "regionCode": "IMP-TS",
            "requestTowCompany": false,
            "imsOnly": false,
            "sortOrder": 0,
            "etims": false
        },
        "equipment": {
            "id": 188,
            "equipmentClass": "LIGHT",
            "regionCode": "IMP-TS",
            "code": "LIGHT",
            "name": "Regular",
            "secondVehicleAllowed": false,
            "dispatch": true,
            "impound": true,
            "defaultForAutodispatch": true,
            "allowedIfTCTZETisMissing": false
        },
        "reason": {
            "id": 1887,
            "code": "TEST",
            "name": "Test",
            "regionCode": "IMP-TS",
            "active": true,
            "sendToImpoundSystem": true,
            "category": "IMPOUND",
            "medical": false,
            "sweep": false,
            "skipStorage": false,
            "salvor": false,
            "ads": true,
            "publiclyVisible": false
        },
        "zone": {
            "code": "IMP-TS",
            "name": "Test Zone",
            "precinctId": 0,
            "active": true,
            "testZone": true,
            "regionDefault": false
        },
        "towOperatorCompany": {
            "code": "ART-IMP-TS",
            "id": 1338,
            "name": "Test Company"
        },
        "currentImpoundOperator": {
            "code": "ART-IMP-TS",
            "id": 1338,
            "name": "Test Company"
        },
        "currentLot": {
            "code": "ART-IMP-TS",
            "latitude": 29.763576,
            "longitude": -95.356544,
            "companyCode": "ART-IMP-TS",
            "addr1": "123 Test Zone Lot",
            "city": "San Francisco",
            "zip": "94105",
            "phone": "9999999999",
            "twoStepRelease": false,
            "state": {
                "id": "CA",
                "code": "CA",
                "name": "CALIFORNIA",
                "country": "USA",
                "displayName": "CA - CALIFORNIA"
            },
            "id": 1369,
            "name": "ART-IMP-TS Test Lot"
        },
        "currentLocation": {
            "code": "ART-IMP-TS",
            "latitude": 29.763576,
            "longitude": -95.356544,
            "companyCode": "ART-IMP-TS",
            "addr1": "123 Test Zone Lot",
            "city": "San Francisco",
            "zip": "94105",
            "phone": "9999999999",
            "twoStepRelease": false,
            "state": {
                "id": "CA",
                "code": "CA",
                "name": "CALIFORNIA",
                "country": "USA",
                "displayName": "CA - CALIFORNIA"
            },
            "id": 1369,
            "name": "ART-IMP-TS Test Lot"
        },
        "holds": [],
        "contacts": [
            {
                "phoneNumber": "5555555555",
                "email": "joe@example.com",
                "void": false,
                "city": "City",
                "zip": "12345",
                "firstName": "Joe",
                "lastName": "Schmoe",
                "address1": "Address",
                "address2": "Address2",
                "identification": "ABC123",
                "identificationType": "US_DL",
                "idState": "CA",
                "contactId": 12330,
                "state": "CA",
                "type": "PAID_BY",
                "id": 12330
            },
            {
                "phoneNumber": "5555555555",
                "email": "joe@example.com",
                "void": false,
                "city": "City",
                "zip": "12345",
                "firstName": "Joe",
                "lastName": "Schmoe",
                "address1": "Address",
                "address2": "Address2",
                "identification": "ABC123",
                "identificationType": "US_DL",
                "idState": "CA",
                "contactId": 12331,
                "state": "CA",
                "type": "PAID_BY",
                "id": 12331
            }
        ],
        "relatedVehicles": [],
        "towReferenceNumber": "000268A000268",
        "waivers": [],
        "patrolUnitNumber": "5409",
        "towOrigin": {
            "addr1": "SEE MAP",
            "city": "Mountain View",
            "state": "CA"
        },
        "responseDate": "2023-01-09T04:47:37",
        "requestedDate": "2023-01-09T04:27:37.207",
        "dispatchedDate": "2023-01-09T04:27:37",
        "acceptedDate": "2023-01-09T04:28:52",
        "onsiteDate": "2023-01-09T04:28:58",
        "inTowDate": "2023-01-09T04:29:04",
        "clearedDate": "2023-01-09T04:29:09.232",
        "driverName": "Passport Test Driver",
        "conditions": [],
        "specialEvent": false,
        "nonStandardVin": false
    }
]


Once you have the correct vehicle you can then retrieve its fees by its vehicleId.

VehicleId is the unique id for each time a vehicle gets towed. If it gets towed twice, it will get 2 vehicleIds. You then make a request to the /impound endpoint which will get you the complete vehicle details including the fees as of the time of the request.

 Get detailed vehicle information

for example will give a response containing most of the details of the vehicle. In particular you’ll want to look at

  • currentLocation which represents the best way to get into contact with whoever has current possession of the vehicle

  • make.name , model.name , color.name , license , licenseState.code

  • unpaidFeeItems which contains all of the fee items that are not paid yet. If you want the total then you can sum unpaidFeeItems.totalPrice which is the total price of the vehicle, including tax.

  • eligibleForRelease indicates if the vehicle is currently releasable. Holds may prevent release of the vehicle, in which case you probably don’t want to let people pay for it.

Here is an example of the response

 Detailed vehicle info response
{
    "instructions": "Please call us to get more information about this vehicle.",
    "vehicle": {
        "id": 1067632,
        "status": "STORED",
        "version": 6,
        "region": {
            "id": 8000,
            "privateRegion": false,
            "standardRegion": true,
            "managedRegion": true,
            "code": "IMP-TS",
            "name": "Impound Test Region",
            "state": "CA",
            "center": {
                "lat": 37.766,
                "lon": -122.428
            },
            "zoneId": "America/Los_Angeles",
            "serverTimeOffset": 0,
            "topRight": {
                "lat": 37.832,
                "lon": -122.355
            },
            "bottomLeft": {
                "lat": 37.668,
                "lon": -122.529
            }
        },
        "make": {
            "id": 148,
            "code": "AIR",
            "name": "AIR",
            "active": true,
            "motorcycle": false
        },
        "model": {
            "id": 2307,
            "makeId": 148,
            "name": "CITY BIKE DA DONNA",
            "code": "CITY BIKE DA DONNA",
            "active": true,
            "motorcycle": false
        },
        "color": {
            "id": 1,
            "name": "BLACK",
            "code": "BLCK",
            "active": true
        },
        "body": {
            "id": 65155,
            "name": "ALL TERAIN VEHICLE",
            "code": "ATV",
            "active": true,
            "motorcycle": false,
            "sortOrder": 29
        },
        "vehicleYear": 0,
        "keyStatus": "KEY_MADE",
        "odometer": 0,
        "vin": "2P4GP2539YR506044",
        "noVin": false,
        "vinNotVisible": false,
        "noPlate": false,
        "license": "KK00001",
        "licenseState": {
            "code": "NC",
            "name": "NORTH CAROLINA",
            "active": true
        },
        "storage": [
            {
                "timeFrom": "2023-01-09T04:29:09.232",
                "lot": {
                    "code": "ART-IMP-TS",
                    "latitude": 29.763576,
                    "longitude": -95.356544,
                    "companyCode": "ART-IMP-TS",
                    "addr1": "123 Test Zone Lot",
                    "city": "San Francisco",
                    "zip": "94105",
                    "phone": "9999999999",
                    "twoStepRelease": false,
                    "state": {
                        "id": "CA",
                        "code": "CA",
                        "name": "CALIFORNIA",
                        "country": "USA",
                        "displayName": "CA - CALIFORNIA"
                    },
                    "id": 1369,
                    "name": "ART-IMP-TS Test Lot"
                },
                "id": 50408
            }
        ],
        "account": {
            "id": 305,
            "code": "TSTACC",
            "name": "TSTACC",
            "active": true,
            "regionCode": "IMP-TS",
            "requestTowCompany": false,
            "imsOnly": false,
            "sortOrder": 0,
            "etims": false
        },
        "equipment": {
            "id": 188,
            "equipmentClass": "LIGHT",
            "regionCode": "IMP-TS",
            "code": "LIGHT",
            "name": "Regular",
            "secondVehicleAllowed": false,
            "dispatch": true,
            "impound": true,
            "defaultForAutodispatch": true,
            "allowedIfTCTZETisMissing": false
        },
        "reason": {
            "id": 1887,
            "code": "TEST",
            "name": "Test",
            "regionCode": "IMP-TS",
            "active": true,
            "sendToImpoundSystem": true,
            "category": "IMPOUND",
            "medical": false,
            "sweep": false,
            "skipStorage": false,
            "salvor": false,
            "ads": true,
            "publiclyVisible": false
        },
        "zone": {
            "code": "IMP-TS",
            "name": "Test Zone",
            "precinctId": 0,
            "active": true,
            "testZone": true,
            "regionDefault": false
        },
        "towOperatorCompany": {
            "code": "ART-IMP-TS",
            "id": 1338,
            "name": "Test Company"
        },
        "currentImpoundOperator": {
            "code": "ART-IMP-TS",
            "id": 1338,
            "name": "Test Company"
        },
        "currentLot": {
            "code": "ART-IMP-TS",
            "latitude": 29.763576,
            "longitude": -95.356544,
            "companyCode": "ART-IMP-TS",
            "addr1": "123 Test Zone Lot",
            "city": "San Francisco",
            "zip": "94105",
            "phone": "9999999999",
            "twoStepRelease": false,
            "state": {
                "id": "CA",
                "code": "CA",
                "name": "CALIFORNIA",
                "country": "USA",
                "displayName": "CA - CALIFORNIA"
            },
            "id": 1369,
            "name": "ART-IMP-TS Test Lot"
        },
        "currentLocation": {
            "code": "ART-IMP-TS",
            "latitude": 29.763576,
            "longitude": -95.356544,
            "companyCode": "ART-IMP-TS",
            "addr1": "123 Test Zone Lot",
            "city": "San Francisco",
            "zip": "94105",
            "phone": "9999999999",
            "twoStepRelease": false,
            "state": {
                "id": "CA",
                "code": "CA",
                "name": "CALIFORNIA",
                "country": "USA",
                "displayName": "CA - CALIFORNIA"
            },
            "id": 1369,
            "name": "ART-IMP-TS Test Lot"
        },
        "holds": [],
        "contacts": [
            {
                "phoneNumber": "5555555555",
                "email": "joe@example.com",
                "void": false,
                "city": "City",
                "zip": "12345",
                "firstName": "Joe",
                "lastName": "Schmoe",
                "address1": "Address",
                "address2": "Address2",
                "identification": "ABC123",
                "identificationType": "US_DL",
                "idState": "CA",
                "contactId": 12330,
                "state": "CA",
                "type": "PAID_BY",
                "id": 12330
            },
            {
                "phoneNumber": "5555555555",
                "email": "joe@example.com",
                "void": false,
                "city": "City",
                "zip": "12345",
                "firstName": "Joe",
                "lastName": "Schmoe",
                "address1": "Address",
                "address2": "Address2",
                "identification": "ABC123",
                "identificationType": "US_DL",
                "idState": "CA",
                "contactId": 12331,
                "state": "CA",
                "type": "PAID_BY",
                "id": 12331
            }
        ],
        "relatedVehicles": [],
        "towReferenceNumber": "000268A000268",
        "waivers": [],
        "patrolUnitNumber": "5409",
        "towOrigin": {
            "addr1": "SEE MAP",
            "city": "Mountain View",
            "state": "CA"
        },
        "responseDate": "2023-01-09T04:47:37",
        "requestedDate": "2023-01-09T04:27:37.207",
        "dispatchedDate": "2023-01-09T04:27:37",
        "acceptedDate": "2023-01-09T04:28:52",
        "onsiteDate": "2023-01-09T04:28:58",
        "inTowDate": "2023-01-09T04:29:04",
        "clearedDate": "2023-01-09T04:29:09.232",
        "driverName": "Passport Test Driver",
        "conditions": [],
        "specialEvent": false,
        "nonStandardVin": false
    },
    "feeIncreases": [
        {
            "dateTime": {
                "dateTimeString": "2024-01-17T00:00:00.000"
            },
            "delta": 22.760000000000001563194018672220408916473388671875,
            "amount": 8680.500000000000001563194018672220408916473388671875
        },
        {
            "dateTime": {
                "dateTimeString": "2024-01-18T00:00:00.000"
            },
            "delta": 22.760000000000001563194018672220408916473388671875,
            "amount": 8703.260000000000003126388037344440817832946777343750
        }
    ],
    "allFeeItems": [
        {
            "code": "TowLD",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 145.5000,
            "unitsCount": 1.00,
            "feeCategory": "TOW",
            "totalPrice": 145.5000,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalPricePretax": 145.5000,
            "name": "Tow Fee-Light"
        },
        {
            "code": "ImpoundmentFee",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 1.00,
            "taxRate": 8.2500,
            "feeCategory": "IMPOUNDMENT",
            "totalPrice": 22.7600,
            "unitTax": 1.7300,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalTax": 1.7300,
            "totalPricePretax": 21.0300,
            "name": "Impoundment Fee"
        },
        {
            "code": "Storage-STANDARD_REGULAR-IMP-TS-NONE",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 372.00,
            "taxRate": 8.2500,
            "feeCategory": "STORAGE",
            "totalPrice": 8466.7200,
            "unitTax": 1.7300,
            "effectiveDate": "2024-01-15T20:15:50.18237",
            "totalTax": 643.5600,
            "totalPricePretax": 7823.1600,
            "name": "Storage"
        },
        {
            "code": "Storage-STANDARD_REGULAR-IMP-TS-NONE",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 1.00,
            "taxRate": 8.2500,
            "feeCategory": "STORAGE",
            "totalPrice": 22.7600,
            "unitTax": 1.73,
            "effectiveDate": "2024-01-15T20:15:50.18237",
            "totalTax": 1.7300,
            "totalPricePretax": 21.03,
            "name": "Storage"
        }
    ],
    "condensedFeeItems": [
        {
            "code": "TowLD",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 145.5000,
            "unitsCount": 1.00,
            "feeCategory": "TOW",
            "totalPrice": 145.50,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalPricePretax": 145.50,
            "name": "Tow Fee-Light"
        },
        {
            "code": "ImpoundmentFee",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 1.00,
            "taxRate": 8.2500,
            "feeCategory": "IMPOUNDMENT",
            "totalPrice": 22.7600,
            "unitTax": 1.73,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalTax": 1.7300,
            "totalPricePretax": 21.03,
            "name": "Impoundment Fee"
        },
        {
            "code": "Storage-STANDARD_REGULAR-IMP-TS-NONE",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 373.00,
            "taxRate": 8.2500,
            "feeCategory": "STORAGE",
            "totalPrice": 8489.4800,
            "unitTax": 1.73,
            "effectiveDate": "2024-01-15T20:15:50.18237",
            "totalTax": 645.2900,
            "totalPricePretax": 7844.19,
            "name": "Storage"
        }
    ],
    "unpaidFeeItems": [
        {
            "code": "TowLD",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 145.5000,
            "unitsCount": 1.00,
            "feeCategory": "TOW",
            "totalPrice": 145.50,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalPricePretax": 145.50,
            "name": "Tow Fee-Light"
        },
        {
            "code": "ImpoundmentFee",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 1.00,
            "taxRate": 8.2500,
            "feeCategory": "IMPOUNDMENT",
            "totalPrice": 22.7600,
            "unitTax": 1.73,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalTax": 1.7300,
            "totalPricePretax": 21.03,
            "name": "Impoundment Fee"
        },
        {
            "code": "Storage-STANDARD_REGULAR-IMP-TS-NONE",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 373.00,
            "taxRate": 8.2500,
            "feeCategory": "STORAGE",
            "totalPrice": 8489.4800,
            "unitTax": 1.73,
            "effectiveDate": "2024-01-15T20:15:50.18237",
            "totalTax": 645.2900,
            "totalPricePretax": 7844.19,
            "name": "Storage"
        }
    ],
    "eligibleForRelease": true,
    "receipts": []
}

Once the user has indicated that they want to pay you must collect contact information from the user, this is used to ensure that the vehicle is released to the correct person later in the process.

You then call the /createReceipt endpoint with the vehicleId and contact details the list of fees you want to pay. If you want to just always pay all of the fees then you can leave that element null or empty.

 Creating a receipt

curl --location 'https://staging-api.autoreturn.net/api-web/api/impound/createReceipt' \
--header 'Content-Type: application/json' \
--data-raw '{
"vehicleId": 1067632,
"receiptType": "RELEASE",
"releasedTo": {
"firstName": "Joe",
"lastName": "Schmoe",
"address1": "Address",
"address2": "Address2",
"city": "City",
"state": "CA",
"zip": "12345",
"email": "joe@example.com",
"type": "PAID_BY",
"phoneNumber": "5555555555",
"identification": "ABC123",
"identificationType": "US_DL",
"idState": "CA"
},
"receiptMessage": "Example"
}'

 Response Example
{
    "vehicleId": 1067632,
    "fees": [
        {
            "code": "TowLD",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 145.5000,
            "unitsCount": 1.00,
            "feeCategory": "TOW",
            "totalPrice": 145.5000,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalPricePretax": 145.5000,
            "postedReceiptId": 1003947,
            "name": "Tow Fee-Light"
        },
        {
            "code": "ImpoundmentFee",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 1.00,
            "taxRate": 8.2500,
            "feeCategory": "IMPOUNDMENT",
            "totalPrice": 22.7600,
            "unitTax": 1.7300,
            "effectiveDate": "2023-01-09T04:29:09.232",
            "totalTax": 1.7300,
            "totalPricePretax": 21.0300,
            "postedReceiptId": 1003947,
            "name": "Impoundment Fee"
        },
        {
            "code": "Storage-STANDARD_REGULAR-IMP-TS-NONE",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 21.0300,
            "unitsCount": 372.00,
            "taxRate": 8.2500,
            "feeCategory": "STORAGE",
            "totalPrice": 8466.7200,
            "unitTax": 1.7300,
            "effectiveDate": "2024-01-15T20:15:50.18237",
            "totalTax": 643.5600,
            "totalPricePretax": 7823.1600,
            "postedReceiptId": 1003947,
            "name": "Storage"
        }
    ],
    "amount": 8634.9800,
    "posted": true,
    "paidAmount": 0,
    "receiptType": "RELEASE",
    "createdDate": "2024-01-15T20:20:07.505775",
    "impoundContact": {
        "phoneNumber": "5555555555",
        "email": "joe@example.com",
        "void": false,
        "city": "City",
        "zip": "12345",
        "firstName": "Joe",
        "lastName": "Schmoe",
        "address1": "Address",
        "address2": "Address2",
        "identification": "ABC123",
        "identificationType": "US_DL",
        "idState": "CA",
        "contactId": 12331,
        "state": "CA",
        "type": "PAID_BY",
        "id": 12331
    },
    "unpaidAmount": 8634.9800,
    "paid": false,
    "effectiveDate": "2024-01-15T20:20:07.38789",
    "payments": [],
    "id": 1003947
}

From this request you will receive a receipt Id (labeled just id in the response). This receipt must then be paid. call the /applyPayment endpoint with that receiptId and the details of the payment.

Note that even if a vehicle has been paid for, it might not be releasable if for example it has holds that prevent release.

 Applying the payment to the receipt

curl --location 'https://staging-api.autoreturn.net/api-web/api/impound/applyPayment' \
--header 'Content-Type: application/json' \
--data '{
"receiptId": 1003947,
"amount": 8634.9800,
"paymentType": "ON_ACCOUNT",
"externalRefNumber": "YOUR_REF",
"impoundContact": {
"contactId": 12330
}
}'

 Apply payment response
{
    "instructions": "\r\n<p>This vehicle was towed by the San Francisco Police Department (SFPD).  Prior to visiting the customer service center to retrieve your vehicle, you must first obtain a Police Release.</p>\r\n<br>\r\n<p>NOTE:  Some vehicles towed by SFPD may require a release from 850 Bryant St. Room 154 (SFPD Traffic Division).  Please inquire with AutoReturn first to see if your vehicle needs a release from the SFPD Traffic Division. </p>\r\n<br>\r\n<p>The closest SFPD station to the AutoReturn service center is the Southern Station, Southern Station is located at 1251 3rd Street., San Francisco, CA.  Southern Station can be reached by phone at 415-553-1373 and is open 24 hours a day, 365 days a year.  Please note that this release form is yellow in color with a pink information page behind it.   Once you have obtained the release, please come directly to the customer service center.  Our customer service center is located at 450 7th Street, between Bryant and Harrison Streets, across from the San Francisco Sheriffs Department.  Remember to bring the Police Release with you or we will be unable to release your vehicle.  You are responsible for all fees accrued until you bring in the Release and pay your fees. You will be required to pay all outstanding towing, storage, and other fees accrued for the vehicle since the time of tow.  In addition, if there are 5 or more citations in penalty, you will be required to pay for these as well.  Outstanding citation information is not available through our web site.  Please call our service center at 415-865-8200 for information about delinquent citations. The storage facility is open 24 hours a day, 365 days a year for vehicle retrieval. Please be aware that as required by the City and County of San Francisco, there must be a currently licensed driver to take the vehicle out of our storage facility.</p>\r\n",
    "vehicle": {
        "id": 1068698,
        "status": "STORED",
        "version": 4,
        "region": {
            "id": 1,
            "privateRegion": false,
            "standardRegion": false,
            "managedRegion": true,
            "code": "SF-CA",
            "name": "San Francisco, CA",
            "state": "CA",
            "center": {
                "lat": 37.766,
                "lon": -122.428
            },
            "zoneId": "America/Los_Angeles",
            "serverTimeOffset": 0,
            "topRight": {
                "lat": 37.832,
                "lon": -122.355
            },
            "bottomLeft": {
                "lat": 37.668,
                "lon": -122.529
            }
        },
        "make": {
            "id": 7,
            "code": "ASTO",
            "name": "ASTON MARTIN",
            "active": true,
            "motorcycle": false
        },
        "model": {
            "id": 33,
            "makeId": 7,
            "name": "OTHER",
            "code": "OTHER",
            "active": true,
            "motorcycle": false
        },
        "color": {
            "id": 1,
            "name": "BLACK",
            "code": "BLCK",
            "active": true
        },
        "body": {
            "id": 2436527,
            "name": "OTHER",
            "code": "OTHR",
            "active": true,
            "motorcycle": false,
            "sortOrder": 16
        },
        "vehicleYear": 2002,
        "engineType": {
            "code": "OTHR",
            "name": "OTHER",
            "id": 1389
        },
        "keyStatus": "NO_KEY",
        "odometer": 0,
        "vin": "SCFAC23302B500083",
        "noVin": false,
        "vinNotVisible": false,
        "noPlate": true,
        "license": "NO PLATE",
        "licenseState": {
            "code": "--",
            "name": "No Plate",
            "active": true
        },
        "storage": [
            {
                "timeFrom": "2023-12-18T14:23:05.552",
                "lot": {
                    "code": "ST",
                    "latitude": 37.77454199165783,
                    "longitude": -122.40573800280957,
                    "companyCode": "SF-CA-IMP",
                    "addr1": "450 7th St",
                    "city": "San Francisco",
                    "zip": "94103",
                    "phone": "14158658200",
                    "twoStepRelease": false,
                    "state": {
                        "id": "CA",
                        "code": "CA",
                        "name": "CALIFORNIA",
                        "country": "USA",
                        "displayName": "CA - CALIFORNIA"
                    },
                    "id": 12,
                    "name": "450 7th Street"
                },
                "id": 50407
            }
        ],
        "account": {
            "id": 11,
            "code": "SFPDX",
            "name": "SFPD",
            "active": true,
            "regionCode": "SF-CA",
            "requestTowCompany": false,
            "imsOnly": false,
            "sortOrder": 0,
            "etims": true
        },
        "equipment": {
            "id": 1,
            "equipmentClass": "LIGHT",
            "regionCode": "SF-CA",
            "code": "LIGHT",
            "name": "Reg",
            "secondVehicleAllowed": false,
            "dispatch": true,
            "impound": true,
            "defaultForAutodispatch": false,
            "allowedIfTCTZETisMissing": false,
            "vocalizeName": "regular"
        },
        "reason": {
            "id": 1714,
            "code": "10751",
            "name": "10751 - Removal/Alteration of VIN",
            "regionCode": "SF-CA",
            "active": true,
            "sendToImpoundSystem": true,
            "category": "ARREST/INVESTIGATION/MOVING VIOLATION",
            "medical": false,
            "sweep": false,
            "skipStorage": false,
            "salvor": false,
            "ads": true,
            "publiclyVisible": true
        },
        "zone": {
            "code": "SF-CA",
            "name": "SF",
            "precinctId": 0,
            "active": true,
            "testZone": false,
            "regionDefault": false
        },
        "towOperatorCompany": {
            "code": "ART",
            "id": 265,
            "name": "SF Test AutoReturn Company"
        },
        "currentImpoundOperator": {
            "code": "SF-CA-IMP",
            "id": 1468,
            "name": "TEGSCO - San Francisco"
        },
        "currentLot": {
            "code": "ST",
            "latitude": 37.77454199165783,
            "longitude": -122.40573800280957,
            "companyCode": "SF-CA-IMP",
            "addr1": "450 7th St",
            "city": "San Francisco",
            "zip": "94103",
            "phone": "14158658200",
            "twoStepRelease": false,
            "state": {
                "id": "CA",
                "code": "CA",
                "name": "CALIFORNIA",
                "country": "USA",
                "displayName": "CA - CALIFORNIA"
            },
            "id": 12,
            "name": "450 7th Street"
        },
        "currentLocation": {
            "code": "ST",
            "latitude": 37.77454199165783,
            "longitude": -122.40573800280957,
            "companyCode": "SF-CA-IMP",
            "addr1": "450 7th St",
            "city": "San Francisco",
            "zip": "94103",
            "phone": "14158658200",
            "twoStepRelease": false,
            "state": {
                "id": "CA",
                "code": "CA",
                "name": "CALIFORNIA",
                "country": "USA",
                "displayName": "CA - CALIFORNIA"
            },
            "id": 12,
            "name": "450 7th Street"
        },
        "holds": [],
        "contacts": [
            {
                "company": "A.B.C. Auto Parts",
                "void": false,
                "city": "San Francisco",
                "zip": "94124",
                "address1": "1650 Davidson Avenue",
                "contactId": 12332,
                "state": "CA",
                "type": "INTERESTED_PARTY",
                "id": 12332
            }
        ],
        "relatedVehicles": [],
        "towReferenceNumber": "20231218A0004",
        "waivers": [],
        "requestedByPhone": "+14155531239",
        "towOrigin": {
            "addr1": "642 Central Ave",
            "city": "San Francisco",
            "state": "CA"
        },
        "towDestination": {
            "addr1": "61 Napoleon St",
            "city": "San Francisco",
            "state": "CA"
        },
        "responseDate": "2023-12-18T08:25:37",
        "requestedDate": "2023-12-18T07:50:36.845",
        "dispatchedDate": "2023-12-18T07:50:55",
        "acceptedDate": "2023-12-18T07:51:11",
        "onsiteDate": "2023-12-18T07:51:37",
        "inTowDate": "2023-12-18T09:06:07",
        "clearedDate": "2023-12-18T14:23:05.552",
        "driverName": "Igor ART - SF 02",
        "numCylinders": 12,
        "conditions": [
            {
                "id": 2,
                "displayName": "Extensive front damage"
            },
            {
                "id": 1,
                "displayName": "AWD"
            }
        ],
        "specialEvent": false,
        "nonStandardVin": false
    },
    "feeIncreases": [
        {
            "dateTime": {
                "dateTimeString": "2024-01-17T00:00:00.000"
            },
            "delta": 72,
            "amount": 72.0000
        },
        {
            "dateTime": {
                "dateTimeString": "2024-01-18T00:00:00.000"
            },
            "delta": 72,
            "amount": 144.0000
        }
    ],
    "allFeeItems": [
        {
            "code": "ADMIN",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 336.0000,
            "unitsCount": 1.00,
            "feeCategory": "CITY_FEES",
            "totalPrice": 336.0000,
            "effectiveDate": "2023-12-18T14:23:05.552",
            "totalPricePretax": 336.0000,
            "postedReceiptId": 1003948,
            "name": "City Admin Fee - Excluding Citations"
        },
        {
            "code": "TowP",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 277.0000,
            "unitsCount": 1.00,
            "feeCategory": "TOW",
            "totalPrice": 277.0000,
            "effectiveDate": "2023-12-18T14:23:05.552",
            "totalPricePretax": 277.0000,
            "postedReceiptId": 1003948,
            "name": "Tow Passenger Vehicle"
        },
        {
            "code": "MgmtTow",
            "feeEventType": "TOW_COMPLETED",
            "unitsCount": 1.00,
            "feeCategory": "ADMIN",
            "effectiveDate": "2023-12-18T14:23:05.552",
            "postedReceiptId": 1003948,
            "name": "Management - Tow Fee"
        },
        {
            "code": "1STP-A",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 60.0000,
            "unitsCount": 1.00,
            "feeCategory": "STORAGE",
            "totalPrice": 60.0000,
            "effectiveDate": "2024-01-16T14:05:00",
            "totalPricePretax": 60.0000,
            "postedReceiptId": 1003948,
            "name": "1st Day Storage-PassVeh"
        },
        {
            "code": "StorePsngA",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 72.0000,
            "unitsCount": 29.00,
            "feeCategory": "STORAGE",
            "totalPrice": 2088.0000,
            "effectiveDate": "2024-01-16T14:05:00",
            "totalPricePretax": 2088.0000,
            "postedReceiptId": 1003948,
            "name": "Passenger Vehicle Storage"
        }
    ],
    "condensedFeeItems": [
        {
            "code": "1STP-A",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 60.0000,
            "unitsCount": 1.00,
            "feeCategory": "STORAGE",
            "totalPrice": 60.00,
            "effectiveDate": "2024-01-16T14:05:00",
            "totalPricePretax": 60.00,
            "name": "1st Day Storage-PassVeh"
        },
        {
            "code": "ADMIN",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 336.0000,
            "unitsCount": 1.00,
            "feeCategory": "CITY_FEES",
            "totalPrice": 336.00,
            "effectiveDate": "2023-12-18T14:23:05.552",
            "totalPricePretax": 336.00,
            "name": "City Admin Fee - Excluding Citations"
        },
        {
            "code": "StorePsngA",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 72.0000,
            "unitsCount": 29.00,
            "feeCategory": "STORAGE",
            "totalPrice": 2088.00,
            "effectiveDate": "2024-01-16T14:05:00",
            "totalPricePretax": 2088.00,
            "name": "Passenger Vehicle Storage"
        },
        {
            "code": "TowP",
            "feeEventType": "TOW_COMPLETED",
            "unitPrice": 277.0000,
            "unitsCount": 1.00,
            "feeCategory": "TOW",
            "totalPrice": 277.00,
            "effectiveDate": "2023-12-18T14:23:05.552",
            "totalPricePretax": 277.00,
            "name": "Tow Passenger Vehicle"
        },
        {
            "code": "MgmtTow",
            "feeEventType": "TOW_COMPLETED",
            "unitsCount": 1.00,
            "feeCategory": "ADMIN",
            "effectiveDate": "2023-12-18T14:23:05.552",
            "name": "Management - Tow Fee"
        }
    ],
    "unpaidFeeItems": [],
    "eligibleForRelease": true,
    "receipts": [
        {
            "vehicleId": 1068698,
            "fees": [
                {
                    "code": "ADMIN",
                    "feeEventType": "TOW_COMPLETED",
                    "unitPrice": 336.0000,
                    "unitsCount": 1.00,
                    "feeCategory": "CITY_FEES",
                    "totalPrice": 336.0000,
                    "effectiveDate": "2023-12-18T14:23:05.552",
                    "totalPricePretax": 336.0000,
                    "postedReceiptId": 1003948,
                    "name": "City Admin Fee - Excluding Citations"
                },
                {
                    "code": "TowP",
                    "feeEventType": "TOW_COMPLETED",
                    "unitPrice": 277.0000,
                    "unitsCount": 1.00,
                    "feeCategory": "TOW",
                    "totalPrice": 277.0000,
                    "effectiveDate": "2023-12-18T14:23:05.552",
                    "totalPricePretax": 277.0000,
                    "postedReceiptId": 1003948,
                    "name": "Tow Passenger Vehicle"
                },
                {
                    "code": "MgmtTow",
                    "feeEventType": "TOW_COMPLETED",
                    "unitsCount": 1.00,
                    "feeCategory": "ADMIN",
                    "effectiveDate": "2023-12-18T14:23:05.552",
                    "postedReceiptId": 1003948,
                    "name": "Management - Tow Fee"
                },
                {
                    "code": "1STP-A",
                    "feeEventType": "TOW_COMPLETED",
                    "unitPrice": 60.0000,
                    "unitsCount": 1.00,
                    "feeCategory": "STORAGE",
                    "totalPrice": 60.0000,
                    "effectiveDate": "2024-01-16T14:05:00",
                    "totalPricePretax": 60.0000,
                    "postedReceiptId": 1003948,
                    "name": "1st Day Storage-PassVeh"
                },
                {
                    "code": "StorePsngA",
                    "feeEventType": "TOW_COMPLETED",
                    "unitPrice": 72.0000,
                    "unitsCount": 29.00,
                    "feeCategory": "STORAGE",
                    "totalPrice": 2088.0000,
                    "effectiveDate": "2024-01-16T14:05:00",
                    "totalPricePretax": 2088.0000,
                    "postedReceiptId": 1003948,
                    "name": "Passenger Vehicle Storage"
                }
            ],
            "amount": 2761.0000,
            "posted": true,
            "paidAmount": 2761.00,
            "receiptType": "RELEASE",
            "createdDate": "2024-01-16T14:05:35.96803",
            "impoundContact": {
                "company": "A.B.C. Auto Parts",
                "void": false,
                "city": "San Francisco",
                "zip": "94124",
                "address1": "1650 Davidson Avenue",
                "contactId": 12332,
                "state": "CA",
                "type": "INTERESTED_PARTY",
                "id": 12332
            },
            "unpaidAmount": 0.0000,
            "paid": true,
            "effectiveDate": "2024-01-16T14:05:00",
            "payments": [
                {
                    "amount": 2761.00,
                    "posted": true,
                    "createdDate": "2024-01-16T14:07:09.854882",
                    "impoundContact": {
                        "company": "A.B.C. Auto Parts",
                        "void": false,
                        "city": "San Francisco",
                        "zip": "94124",
                        "address1": "1650 Davidson Avenue",
                        "contactId": 12332,
                        "state": "CA",
                        "type": "INTERESTED_PARTY",
                        "id": 12332
                    },
                    "paymentType": "ON_ACCOUNT",
                    "paymentDate": "2024-01-16T14:07:09.854877",
                    "externalRefNumber": "YOUR_REF",
                    "userName": "abarton",
                    "receivedForUserId": 121,
                    "id": 1003668
                }
            ],
            "id": 1003948
        }
    ]
}

Note the contactId was returned in the previous result. This allows you to reuse the same contact for who the receipt is issued to, and who is paying. Generally only the person the receipt is issued to can retrieve the vehicle from the lot, however this may vary by municipal policy.

Note that once a receipt has been created for a vehicle it must be paid for or voided.

  • No labels