Create Rate


This method is part of the Service Provider's Published Rates flow. This conceptual diagram is part of the overall workflow.

Service Provider Creates Rate in Response to Rate Request Notification

The Service Provider receives a rate request notification...

  • when either a listing or a rate request matches the saved search he or she selected to be notified.
  • when a listing is edited or updated in such a way that a price change could occur on a previously placed rate.

The Service Provider creates a rate in response to the details from the rate request notification. Post a bookable published rate to uShip using this method.

 

Sample JSON POST

URI https://api.uship.com/v2/rateRequests/{rateRequestID}/rates/

A Service Provider creates a rate from the rate request. Get the rateRequestID from the rate request notification.

Request Headers Value
Accept application/json
Content-Type application/json

 

Sample Input JSON Request

{
		"checksum": "{checksum}",
		"Amount": {
			Amount: 500.00,
			CurrencyType: "USD"
		},
		"ExpirationDate": "2014/10/10",
		"AdduShipFee": false,
		"PickupTimeframe": {
			"Date1": "2014/10/20",
            "Date2": "2014/10/25", 
			"TimeFrameType": "Between"
		},
		"DeliveryTimeframe": {
			"Date1": "2014/10/30",
			"TimeFrameType": "OnDate"
		},
		"ServiceType": "OpenTransport",
		"ServiceTypeDescription": "Service Type Description",
		"TransportMode": "Intermodal",
		"VehicleType": "Car",
		"PaymentMethods": [
			"Cash"
		],
		"PaymentTimes": [
			"BeforePickup",
			"AtDelivery"
		],
		"PaymentTerms": "Payment Description",
		"AdditionalInformation": "Additional Information description",
		"TermsAndConditions": "Terms and Conditions", 
		"ThirdPartyUniqueId": "321",
	}

 

Response

Success Status: 201 Created

Response Header

Location header: https://api.uship.com/v2/rateRequests/rateRequestID/rates

 

Error Codes

Input validation on specific fields. This is not an exhaustive list.  

Field Specific Explanation
40001 Earliest date and Latest date must match with \"On\" timeframe type.
40001 Rate creation can only be done once--in response to a unique rate request.
40010 XSS content and possible XSS content are invalid.

 

API Reference


Field Type Description
checksum
String Required. Obtain the value from the rate request notification. The checksum verifies that the rate request has not been changed since it was originally created. The verification is a unique alphanumeric string identifier that changes any time a user or the system updates relevant rate request data. The rate request must match the original data for the checksum to remain the same. If the rate request does not match, then we send a new rate request.
amount
Wrapper

Required. Container for the published rate amount and currency type. Obtain a list of 3-letter ISO4217 standard values currently supported by the uShip API via GET Currencies Lookup API https://api.uship.com/v2/lookups/currencies/. The minimum rate amount is $20.00.

  • amount: 1000,
  • currencyType: "USD"
expirationDate
String Required. When the rate expires. Accepted formats: "YYYY/MM/DD", "YYYY-MM-DD", "MM-DD-YYYY", and UTC (example: "2012-02-09T15:03:38.3157571”).
adduShipFee
Boolean

To simplify billing, uShip collects a deposit from Shipping Customers when they accept a bid on uShip. This deposit is credited to the Service Provider’s uShip account and offsets the Service Provider’s booking fees due to uShip. uShip’s booking fees for Customer Loads are based on origin, destination, category, and/or bid price. 

Fees are converted to match your account’s currency setting and are calculated based on current exchange rates at the time the rate is calculated. You can update your currency setting from Regional Settings. All discounts or promotions, apply regardless of the applicable fee schedule.  If available, account credits will automatically be applied toward uShip fees.

  • true - Include the uShip fee in the calculation of the published rate.
  • false - Do not include the uShip fee in the rate calculation. Default. 
serviceType
String Required. The service type is tied to the category of the object being shipped. Retrieve the service types supported by the uShip API via GET https://api.uship.com/v2/lookups/serviceTypes/. 
serviceTypeDescription
String Optional. Provides more information about the service type for the rate.
transportMode
String Required. The transport mode that the Service Provider can provide. See transport mode.
vehicleType
String Required. The vehicle type that the Service Provider would use to ship the shipment. See vehicle types.
paymentMethods
Array

Required. Obtain the payment method value via GET https://api.uship.com/v2/paymentmethods.

Valid Options:

  • “Cash”
  • “CreditCard”
  • “Check”
  • "Paypal"
  • "uShipPayments"
paymentTimes
Array

Required. When the Service Provider requires payment from the Shipping Customer.

Valid Options:

  • “BeforePickup”
  • “AtPickup”
  • “AtDelivery”
  • "Other"
paymentTerms
String Optional. Description of payment terms or details to add to the rate.
AdditionalInformation
String Optional. Description of additional payment terms or details to add to the rate.
TermsAndConditions
String Optional. Description of the terms and conditions that the rate considered valid and may cover the how the booking will be completed. Can be null.
ThirdPartyUniqueId
String Optional. Unique string identifier supplied by the third party for custom tracking purposes.

Pick up and Delivery Timeframe

Field Type Description
pickupTimeframe
Container Wrapper for the date and time (UTC) range when the service provider can pick up the shipment.
deliveryTimeframe
Container Wrapper for the date and time (UTC) range when the service provider can deliver the shipment.
date1
String The “date1”  is an origin or from value that must always be less than the “date2” value.
date2
String Required if supplied as a destination or range value. If specified with the timeFrametype "on", the dates must match exactly.
timeFrameType
String

Valid Options:

  • “Between” 
  • "On"
  • "DaysDelay"