Driver Network Permissions


Please see the Driver Network Overview to understand how these permissions fit in the workflow.

Use Case

A network driver can see the details for the listing their dispatcher assigned to them.

GET

https://api.uship.com/v2/listings/{listingId}

For the full reference on this method, see https://developer.uship.com/docs/apis/listings/Retrieve_Listing.

As a <user type>, I want to <function> so that <benefit>. Permissions

As Assigned Driver Jay who is in Dispatcher Dan's Driver Network,

Given Jay has been assigned to transport Dan's booked listing,

When Jay retrieves that listing, the response should be OK (200),

Where the output indicates

  • Dan as the service provider,
  • Jay as the assigned driver, and
  • does not contain the feedback hypermedia link.

 

An assigned driver...

  • can view the details of the listing the dispatcher assigned to them.

  • will never see a hypermedia link for feedback.

The feedback hypermedia link will only return for the winning bidder (dispatcher).

The assignedDriver object...

  • will never be seen by the shipper.
  • returns in the listing detail response only if the listing has been assigned to a driver other than the dispatcher.
  • is included in the output for the dispatcher and the assigned driver only.

As Dispatcher Dan,

Given he has assigned one of his booked listings to Driver Jay,

When he retrieves that listing, the response should be OK (200),

Where the output indicates

  • Dan as the service provider
  • Jay as the assigned driver, and
  • contains the feedback hypermedia link.
A dispatcher can view booking, bid, and assignment details for a listing he has assigned to a driver (or to himself) for transport.

As Shipper Sam,

Given that he booked the listing with Dan,

When he retrieves the listing, the response should be OK (200),

Where the output indicates

  • Dan as the service provider and
  • contains the feedback hypermedia link.

A shipper will not have any output about the assigned driver for the listing returned.

 

Response Excerpt

Success Status: 200 OK

{
    ...
    "assignedDriver": {
        "userId": 12345678,
        "displayName": "TSP Carrier",
        "imageUrl": "http://api.uship.com/resize.php?path=%2fstatic%2fusers%2f7420c94b-197e-4600-b.jpg",
        "feedback": {
            "count": 78,
            "percentPositive": 100,
            "starRating": 5
        },
        "links": [
            {
                "rel": "Item",
                "verb": "GET",
                "href": "/v2/users/12345678/profile",
                "title": "profile"
            }
        ]
    },
    ...
}

 


Use Case

A network driver can see all of the listings assigned to them.

GET

https://api.uship.com/v2/listings/?userType=ServiceProvider

For the full reference on this method, see https://developer.uship.com/docs/apis/listings/Retrieve_Listings.

As a <user type>, I want to <function> so that <benefit>. Permissions

As Assigned Driver Jay who is in Dispatcher Dan's Driver Network,

Given Jay has been assigned to transport Dan's booked listing,

When Jay retrieves all listings assigned to him via

GET https://api.uship.com/v2/listings/userType=ServiceProvider,

and the response should be OK (200),

Where the output...

  • contains a listing item for Dan's booked listing
  • and the booked listing indicates Jay as the assigned driver.

An assigned driver sees all of the listings a dispatcher has assigned.

As Dispatcher Dan,

Given he has assigned one of his booked listings to Driver Jay,

When he retrieves all listings via GET https://api.uship.com/v2/listings/userType=ServiceProvider,

and the response should be OK (200),

Where the output...

  • contains the booked listing,
  • and the booked listing indicates Jay as the assigned driver.

A dispatcher sees the assignedDriver object for all listings returned.

As Shipper Sam,

Given that he booked the listing with Dan,

When he retrieves all listings via GET https://api.uship.com/v2/listings/userType=Shipper,

and the response should be OK (200),

Where the output...

  • contains a listing item for the listing booked with Dan.

A shipper will not have any output about the assigned driver for the listings returned.

 

Response Excerpt

Success Status: 200 OK

Same as above.