Skip to main content

Changelog

[3.0.0] - 2021/09/30

Changed

  • Renamed JobModel created_by_id to created_by.
  • Renamed created_by_id to created_by in JobModel.
  • Changed unresolved/unresolvable user IDs to not result in errors.
  • Changed job.completed_by to resolve as dispatcher when completed_by_driver is False
  • JobModel.completed_by now resolves user ids (username, numeric id, uuid).
  • Removed GET /locations/{location_id}/trucks/{truck_id}/get_jobs_list_pdf.
  • Errors now return request_id in place of explanation.
  • Query params are now sent as JSON body for PATCH /locations/{location_id}/trucks/{truck_id}.
  • POST /haulers and POST /haulers/{hauler_uuid}/connections now use JSON body instead of query params.
  • GET /locations/{location_id}/jobs/{job_id} now returns the DispatchCustomerLocationModel instead of JobCustomerModel.
  • GET /jobs and GET /locations/{location_id}/jobs include only the location settings for the customer set for the job (ReturnedBy).
  • GET /customers and GET /locations/{location_id}/customers now include a list of location settings for each customer.
  • Materials endpoints now return float(0) instead of null for material weights.
  • Removed validation from OPTIONS requests (for CORS compatibility).
  • Changed address state validation to correctly fail on ambiguous shipping addresses.
  • Missing content-type header for requests with empty body now ignored.
  • Removed roles ThirdPartyCrmUser and ThirdPartyAdmin.
  • Changed GET /locations/{location_id}/materials to return the job weight info even if PickupMaterial not set.
  • Changed user identifier outputs from username to user_id (affects all endpoints with user identifiers).
  • Changed driver_id field to return the user_id (vs internal driver_id) for GET /locations/{location_id}/drivers and GET /locations/{location_id}/drivers/{driver_id}.

Added

  • Added X-CRO-VERSION header for specifying versions (backwards compatibility).
  • Added input format validation to user identifiers (applies to all user ids).
  • Added completed_by and requested_by filters to GET /locations/{location_id}/jobs and GET /jobs.
  • Added user id normalization to JobModel.created_by.
  • Added 3rd party dispatcher to user identifier resolution.
  • Added logic to include 3rd party locations for GET /locations/{location_id}/jobs and GET /jobs.
  • Added location_id filter to GET /locations/{location_id}/drivers.
  • Added GET /products endpoint.
  • Added location_id filter to GET /products.
  • Added quantity field to job materials endpoints (including job endpoints).
  • Added schedule_lte and schedule_gte to GET /jobs and GET /locations/{location_id}/jobs.
  • Added all filters from GET /locations/{location_id}/jobs filters to /jobs.
  • Added account_number_1/2 to DispatchCustomerLocationModel, LocationAddressModel, CreateCustomerModel, UpdateDispatchCustomerLocationModel.
  • Added LEED support.
  • Added username field to GET /locations/{location_id}/drivers and GET /locations/{location_id}/drivers/{driver_id}.
  • Added scale_ticket to JobModel.

Fixed

  • Removed duplicate entries in the can_dispatch_to and can_assign_to fields for GET /locations/{location_id}/driver/{driver_id}.
  • Fixed issue with paged results boundary calculation.
  • Job listings now include correct total_count.
  • Customer existence checks now ignore inactive customers & addresses.
  • Provider user IDs now normalized correctly as user IDs (for endpoints accessing return full data).
  • PATCH /locations/{location_id}/trucks/{truck_id} now accepts NULL driver_id.
  • Corrected issue with TruckModel.driver_id being incorrectly interpreted as user id (all endpoints accessing truck resources).
  • Added missing default value (NULL) to GET /locations/{location_id} for postcode field.
  • CreateCustomerAddressModel now uses defaults for optional fields.
  • Adjusted asset location formatting to match models.
  • Fixed invalid exception thrown when tblAdditionalItem.HeavyWeight is NULL.
  • Job endpoints images & return_full fields now returned (previously always missing).
  • NULL user identifier cases now handled correctly for all endpoints using user identifiers.

[2.0.0] - 2021/08/03

Changed

  • All user_id, driver_id, and provider_user_id inputs now accept numeric id, uuid, or username. Username used for outputs for all user_id, driver_id, and provider_user_id fields.
  • The user_id and filter_driver_id are now UserId format.
  • Updated list_assets to include location & name.
  • Changed PATCH /locations/{location_id}/jobs/{job_id} to update job details (instead of dispatch job).
  • Failed tenant/location checks now return 401 Unauthorized instead of 404 Not Found.
  • User not found during authentication will now return 401 Unauthorized.
  • The field sales_rep_id now accepts user uuid, username, or provider id for POST /locations/{location_id}/customers, PATCH /customers/{customer_id}, POST /customers/{customer_id}/locations/{customer_location_id}.
  • CustomerLocationModel.id renamed to customer_id.
  • Output driver_ids are now set to the user_id.
  • Paged results field current_page now returns the page index of the results returned.
  • The sales_rep_identifier check now skips if sale_rep_identifier not set for customer endpoints.
  • Address fields country, line_1, locality, postcode, region now nullable (customer addresses).
  • The suspension_id field now nullable and defaults as NULL (for customers).
  • The sales_rep and reference_number fields now allow null.

Added

  • Excluded UserId formats from credit card number check.
  • CC number checks to all string inputs/outputs.
  • POST /locations/x/jobs/y/additional_items.
  • PATCH /locations/x/jobs/y/additional_items.
  • DELETE /locations/x/jobs/y/additional_items.
  • GET /assets_types.
  • ation & name info to GET /locations/{location_id}/assets.
  • PATCH /locations/{location_id}/jobs/{job_id}/dispatch.
  • GET /jobs.
  • GET /destinations.
  • GET /routes.
  • GET /users/current.
  • GET /users/current/locations.
  • GET /users/current.
  • GET /locations/x/assets implementation.
  • Added location_id to CustomerLocationModel.
  • trailer_id, interface_color to GET /locations/x/trucks.
  • Fields can_set_request_trucks, can_dispatch, is_deactivated, interface_color to driver model for GET /drivers/{driver_id}.
  • Missing driver_ids to user profiles.
  • New crm user type and role.
  • Fields name, active, and location_id filters added to GET /customers.
  • Customer address constraints for billing/shipping.
  • Field username to GET /locations/{location_id}/drivers and GET /locations/{location_id}/drivers/{driver_id}.
  • Location permission check to driver validation (for all driver resources).
  • Renamed contact_id input fields to customer_contact_id.
  • Renamed address_id input fields to customer_address_id.
  • Added location_id to CustomerLocationModel.

Fixed

  • Some fields not being updated for PATCH /drivers/{driver_id}/chats/{driver_chat_msg_id} now updated correctly.
  • Omitted sales_rep_id for POST /customers/{customer_id}/locations/{customer_location_id} no longer returns 500.
  • Fixed page_index issue in customer exists check (affects customer endpoints).
  • CustomerLocationModel.id renamed customer_id.

[1.0.7] - 2020/07/31

Changed

  • Removed role Public from user role list when listing users.
  • Changed list-customer operations to return results based on role (GET /customers, etc.).
  • Updated billing/shipping address logic to be based on parent_id.

Added

  • Added active, last_updated_gte, created_on_gte, is_parent, parent_id filters to GET location/x/customers.
  • Added company_id filter to user list DAL functions
  • Added active filter to list_users.
  • Added filter parent_id to /customers.
  • Added Dispatcher to Administrator roles results.
  • Added is_parent, location_id, is_active filters to GET /customers.
  • Added is_dispatched to list job filters.
  • Added CrmUser role.

Fixed

  • Corrected UserModel.id to UserModel.dispatcher_id for provider_id filter.
  • Fixed issue with suspension_id nullability.
  • Fixed incorrect location id column logic for all location-specific resources.
  • Fixed Dispatcher role validation for null location_id for all endpoints.

[1.0.6] - 2020/06/04

Changed

  • Changed customer address create to accept null for country, region, locality, & postcode if line_1 is null.

[1.0.5] - 2020/05/20

Changed

  • Changed POST /locations/{location_id}/customers to allow omitted and/or NULL contact name, email, number, and fax.

[1.0.4] - 2020/05/09

Added

  • Email, name, & phone number inputs as csv to POST /locations/{location_id}/customers.
  • completed_by_driver filter to GET /locations/{location_id}/jobs.
  • Job materials data to GET /locations/{location_id}/jobs.
  • Field is_active to PATCH /customers/{customer_id}/locations/{location_id}.
  • GET locations/{location_id}/dump_destinations.
  • GET locations/{location_id}/dump_destinations/{dump_destination_id}.
  • Customer dupe detection logic (name & address).

Changed

  • Changed POST /locations/{location_id}/customers to allow omitted and/or NULL renewal_date.
  • Limited job dispatch to Dispatchers.

[1.0.3] - 2019/10/21

Added

  • Parameter max_address_edit_distance to POST /locations/{location_id}/customers.
  • Name filter to GET /location/{location_id}/users.

Changed

  • Duplicate customers created via POST /locations/{location_id}/customers now return 409 conflict.
  • Updated parent_id, line_2, line_3, line_4 to be optional fields for POST /locations/{location_id}/customers.

Fixed

  • Added missing 'id' field to /tenant return results.

[1.0.2] - 2019/09/25

Added

  • Added GET /locations/{location_id}/materials.
  • Added GET /locations/{location_id}/users.
  • Added GET /locations/{location_id}/users/{user_id}.
  • Added scale_ticket field to JobModel.
  • Added webhooks callbacks.
  • Added webhook ping endpoint to API.
  • Fixed issue in user location authorization for Admin roles.

Changed

  • Changed field inputs type validation to restrict to specified type (e.g. JSON int not implicitly converted to string).
  • Changed requests with Admin users to also auth for Dispatched authorized calls.
  • Renamed GET /customers 'filter_name' param to 'name'.

Fixed

  • Fixed header param naming issue in customer locations.
  • Fixed authorization header spec.
  • Fixed customer_id/location_id mixup in the CustomerLocation endpoints.
  • Fixed bug in date filter validation.
  • Fixed exception handling for missing/invalid endpoint arguments.
  • Fixed exception bug and indentation error.

[1.0.1] - 2019/07/30

Fixed

  • Un-flipped Customer ID and Location ID on the "Add customer to location" endpoint.

Added

  • Added filter_last_update_gte and filter_created_on_gte to GET /customers and GET /location/{loc_id}/jobs.
  • Changed requests with Admin users to also auth for Dispatcher authorized calls.

Changed

  • Renamed GET /customers 'filter_name' param to 'name'.

[0.0.0] - 2019/04/16

Fixed

  • Changed MultiTenantSAConnector to raise InputError on connection if missing tenant id.
  • Fixed fence post error in paged queries logic.

Added

  • Exception handling to endpoint arg processing.
  • Support for X-REQUEST-ID header.
  • 'materials' list to job records (for GET /locations/{location_id}/jobs/{job_id} only).

Changed

  • Changed customer contact and address to Dispatcher role access (removed ThirdPartyDispatcher role access).
  • Changed argument validation to raise InputError on invalid signature profile (vs HTTP 500).
  • Changed scope list support (vs single scope).
  • Changed tenant db session logic to raise InputError on x-tenant-id missing.

[0.0.0] - 2019/04/09

Fixed

  • Improved /location/{location_id}/customers GET query performance.

Added

  • No external adds.

Changed

  • Pluralized endpoint URLs.
  • Changed CustomerLocationApi.list_customers to RoleGroup.Authenticated.

[0.0.0] - 2019/03/11

Changed

  • Log GPS event now accepts application/json instead of gps_event_json parameter.
  • Create/update customer changed from request parameter to JSON customer profile.
  • Create/update customer creates/updates customer addresses.
  • Create/update customer creates/updates billing zone codes.
  • Policy verification moved to function entry points.

Added

  • GET /customer
  • GET /customer/{customer_id}
  • PATCH /customer/{customer_id}
  • GET /customer/{customer_id}/location
  • GET /customer/{customer_id}/location/{location_id}
  • POST /customer/{customer_id}/location/{location_id}
  • PATCH /customer/{customer_id}/location/{location_id}
  • GET /customer/{customer_id}/address
  • POST /customer/{customer_id}/address
  • GET /customer/{customer_id}/address/{address_id}
  • PATCH /customer/{customer_id}/address/{address_id}
  • DELETE /customer/{customer_id}/address/{address_id}
  • GET /customer/{customer_id}/contact
  • POST /customer/{customer_id}/contact
  • GET /customer/{customer_id}/contact/{contact_id}
  • PATCH /customer/{customer_id}/contact/{contact_id}
  • POST /location/{location_id}/customer

Fixed

  • Invalid access token no longer returns 500 internal server error.
  • <jwt-access-token> corrected to <access-token> in doc.
  • Validation issues.
  • Filtering issues.

[0.0.0] - 2019/02/26

Changed

  • Requests using unassigned tenant IDs now return 403 instead of 200.
  • Added tenant/location check to policy enforcement

Added

  • POST /location/{location_id}/customer
  • PATCH /location/{location_id}/customer/{customer_id}
  • GET /location/{location_id}/customer/{customer_id}
  • DELETE /location/{location_id}/customer/{customer_id}
  • POST /location/{location_id}/gps_event
  • GET /tenant
  • Added filters to list job endpoint (schedule date range, deleted, completed, driver id, truck id).

Fixed

  • Issue with date comparisons during input validation (aware vs naive)
  • ThirdPartyDriver permission issues with List Customers.

[0.0.0] - 2019/02/08

Added

  • Initial implementations for:
    • GET /location/{location_id}/driver
    • GET /location/{location_id}/driver/{driver_id}
    • GET /location/{location_id}/customer
    • POST /hauler
    • POST /hauler/{hauler_id}/connection
    • GET /hauler/{hauler_id}
    • GET /hauler
    • GET /hauler/{hauler_id}/connection
    • GET /location
    • GET /location/{location_id}
    • PATCH /location/{location_id}/job/{job_id}
    • GET /location/{location_id}/job/{job_id}
    • GET /location/{location_id}/job
    • GET /location/{location_id}/truck/{truck_id}
    • GET /location/{location_id}/truck
    • PATCH /location/{location_id}/truck/{truck_id}